From 7b09f265c1deb12c9e6778c4d92473d66fc5406b Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Wed, 16 Oct 2019 19:34:47 +0300 Subject: [texo] Starting rewriting... --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..09a764d --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +# Debug mode: +# DEBUG = yes + +CC = g++ +LIB = libtexo.a + +CPPFLAGS = -Wall -ansi +ifeq '$(DEBUG)' 'yes' +CPPFLAGS += -g -O0 +else +CPPFLAGS += -O3 +endif + +SRC_DIR = src +SRC = $(wildcard $(SRC_DIR)/*.cpp) +OBJ = $(SRC:.cpp=.o) + + +default: $(LIB) + +ifneq "clean" "$(MAKECMDGOALS)" +-include deps.mk +endif + +deps.mk: $(SRC) + $(CC) -MM $^ > $@ + +%.o: %.cpp %.hpp + $(CC) $(CPPFLAGS) -c $< -o $@ + +$(LIB): $(OBJ) + ar rcs $@ $^ + +clean: + rm -f $(OBJ) $(LIB) deps.mk -- cgit v1.2.3