From d29ed3e8ddfbb0367dd67aa0f3b864b41357d1eb Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 23 Jul 2015 14:14:01 -0600 Subject: Actually added a makefile with dep support. Also updated the gitignore to ignore the dep files. --- Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b6ff92e --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +SRC := $(wildcard src/*.cpp) +OBJECTS := $(patsubst %.cpp,%.o,${SRC}) +DEPS := $(patsubst %.cpp,%.d,${SRC}) + +.PHONY: default all clean + +default: clic.exe + +all: clic.exe + +clean: + -rm clic.exe ${OBJECTS} ${DEPS} + +clic.exe: ${OBJECTS} + g++ -ggdb -o clic.exe ${OBJECTS} -L../libbu++ -lbu++ ${LDCONFIG} + +${OBJECTS}: %.o: %.cpp + g++ -ggdb -W -Wall -I../libbu++ $< -c -o $@ + +${DEPS}: %.d: %.cpp + g++ -M -I../libbu++ $< > $@ + sed -i -e 's,^\([^ ]*\)\( *: *\),src/\1 $@: ,' $@ + +-include ${DEPS} + -- cgit v1.2.3