From 5f7ae62649c79683597e33af673ae1dcf5267917 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 24 Jan 2021 18:48:42 +0100 Subject: Initial commit: Non working initial code --- Makefile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..90471a9 --- /dev/null +++ b/Makefile @@ -0,0 +1,52 @@ +CXX=clang++-11 +#CXX=g++-10 + +CXXFLAGS=-O0 -g -D_DEBUG +#CXXFLAGS=-O2 -DNDEBUG + +CXXFLAGS+=-Wall -Iinclude -std=c++20 + +ifeq ($(CXX),clang++-11) +CXXFLAGS+=-stdlib=libc++ +endif + +LDLIBS+=\ +-lboost_context \ +-lboost_filesystem \ +-lboost_timer \ +-lboost_system \ + +SRC=\ + src/recode.cpp \ + src/test-unicode.cpp + +all: src/recode src/test-unicode + +test: src/test-unicode + src/test-unicode + +src/recode: src/recode.o dep + $(CXX) $(LDFLAGS) $< $(LDLIBS) $(LIBS) -o $@ + +src/test-unicode: src/test-unicode.o dep + $(CXX) $(LDFLAGS) $< $(LDLIBS) $(LIBS) -o $@ + +dep: $(SRC:.cpp=.d) + +%.d: %.cpp + $(CXX) $(CXXFLAGS) -MM -MP -MF $@ -MT $(*D)/$(*F).o -c $< + +%.o: %.cpp %.d + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + -rm -f src/recode src/test-unicode + -find . -name '*.o' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f + +install: + mkdir -p $(DESTDIR)/usr/include + cp include/unicode.h $(DESTDIR)/usr/include + +.PHONY: all test clean install dep + +-include $(wildcard $(SRC:.cpp=.d)) -- cgit v1.2.3