summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy.zurcher@heraeus.com>2014-01-06 15:39:05 +0100
committerJérémy Zurcher <jeremy.zurcher@heraeus.com>2014-01-06 15:39:05 +0100
commit09397c778731916891d660ac4ebbb6f3ac5a15fb (patch)
tree9ec6b32f0a32f2744d173ca0fe91bc5ea2f2cb50 /Makefile
downloaddjb-way-09397c778731916891d660ac4ebbb6f3ac5a15fb.zip
djb-way-09397c778731916891d660ac4ebbb6f3ac5a15fb.tar.gz
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..cde86cf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+DIR=.
+
+include Makefile_base
+
+main: load main.o rt.lib
+ @./load c main ar/arch.a `cat rt.lib`
+
+main.o: compile main.c main.h myflag.h
+ @./compile main.c
+
+myflag.h: testflag choose flags/myflag.h1 flags/myflag.h2
+ @./testflag MY_FLAG lib/mylib.h > test.c
+ @./choose clr test flags/myflag.h1 flags/myflag.h2 > myflag.h
+ @rm test.c
+
+rt.lib: compile load flags/try_clock_gettime.c
+ @( ( ./compile flags/try_clock_gettime.c && ./load -c try_clock_gettime ) \
+ >/dev/null 2>&1 && exit 0 || echo "-lrt" ) > rt.lib
+
+
+# HIGH LEVEL SPECIFIC TARGETS
+
+SUBDIR=lib ar
+
+arch: buildarch
+ -@./buildarch ${SUBDIR}
+
+build: buildstd main
+
+doc : doxy_conf
+ @echo -e "$(CYAN)calling doxygen$(NORM)"
+ @doxygen doxy_conf
+ @echo -e "$(CYAN)done.$(NORM)"
+
+clean: cleanstd
+ @if [ -f main ] ; then rm main; fi
+ @if [ -f myflag.h ] ; then rm myflag.h; fi
+ @if [ -f rt.lib ] ; then rm rt.lib; fi
+ @if [ -f try_clock_gettime ] ; then rm try_clock_gettime; fi
+