diff options
author | Mike Buland <mike@xagasoft.com> | 2015-07-23 14:14:01 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2015-07-23 14:14:01 -0600 |
commit | d29ed3e8ddfbb0367dd67aa0f3b864b41357d1eb (patch) | |
tree | 86f52bf4297e780891abb58d587e4326d4da30ce | |
parent | 8d81d59bcbac8fbae5e63740367fdf55c48691bb (diff) | |
download | clic-d29ed3e8ddfbb0367dd67aa0f3b864b41357d1eb.tar.gz clic-d29ed3e8ddfbb0367dd67aa0f3b864b41357d1eb.tar.bz2 clic-d29ed3e8ddfbb0367dd67aa0f3b864b41357d1eb.tar.xz clic-d29ed3e8ddfbb0367dd67aa0f3b864b41357d1eb.zip |
Actually added a makefile with dep support.
Also updated the gitignore to ignore the dep files.
Diffstat (limited to '')
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 25 |
2 files changed, 26 insertions, 0 deletions
@@ -1,5 +1,6 @@ | |||
1 | .*.swp | 1 | .*.swp |
2 | *.o | 2 | *.o |
3 | *.d | ||
3 | *.exe | 4 | *.exe |
4 | /clic | 5 | /clic |
5 | /.build_cache | 6 | /.build_cache |
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b6ff92e --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,25 @@ | |||
1 | SRC := $(wildcard src/*.cpp) | ||
2 | OBJECTS := $(patsubst %.cpp,%.o,${SRC}) | ||
3 | DEPS := $(patsubst %.cpp,%.d,${SRC}) | ||
4 | |||
5 | .PHONY: default all clean | ||
6 | |||
7 | default: clic.exe | ||
8 | |||
9 | all: clic.exe | ||
10 | |||
11 | clean: | ||
12 | -rm clic.exe ${OBJECTS} ${DEPS} | ||
13 | |||
14 | clic.exe: ${OBJECTS} | ||
15 | g++ -ggdb -o clic.exe ${OBJECTS} -L../libbu++ -lbu++ ${LDCONFIG} | ||
16 | |||
17 | ${OBJECTS}: %.o: %.cpp | ||
18 | g++ -ggdb -W -Wall -I../libbu++ $< -c -o $@ | ||
19 | |||
20 | ${DEPS}: %.d: %.cpp | ||
21 | g++ -M -I../libbu++ $< > $@ | ||
22 | sed -i -e 's,^\([^ ]*\)\( *: *\),src/\1 $@: ,' $@ | ||
23 | |||
24 | -include ${DEPS} | ||
25 | |||