summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
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
+