diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2019-09-27 18:09:07 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2019-09-27 18:09:07 +0300 |
commit | 2eae362fd3f50325067fa3d7e13db6882df80e76 (patch) | |
tree | a6eff5f8f12b990e3d256d4b02fdb86d70d81eac /makefile | |
download | texo-2eae362fd3f50325067fa3d7e13db6882df80e76.tar texo-2eae362fd3f50325067fa3d7e13db6882df80e76.tar.xz texo-2eae362fd3f50325067fa3d7e13db6882df80e76.zip |
Texo initial.
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 0000000..68c986c --- /dev/null +++ b/makefile @@ -0,0 +1,35 @@ +# Debug mode: +# DEBUG = yes + +CC = g++ +LIB = libtexo.a + +CFLAGS = -Wall +ifeq '$(DEBUG)' 'yes' +CFLAGS += -g -O0 +else +CFLAGS += -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 %.h + $(CC) $(CFLAGS) -c $< -o $@ + +$(LIB): $(OBJ) + ar rcs $@ $^ + +clean: + rm -f $(OBJ) $(LIB) deps.mk |