scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

Makefile (764B)


      1 .POSIX:
      2 
      3 PROJECTDIR = ../../..
      4 include $(PROJECTDIR)/scripts/rules.mk
      5 
      6 SYSHDR = ldflags.h\
      7          syscrts.h\
      8          sysincludes.h\
      9          syslibs.h \
     10          cstd.h \
     11 
     12 all: $(SYSHDR)
     13 
     14 cstd.h: cstd-$(STD).h
     15 	cp cstd-$(STD).h $@
     16 
     17 ldflags.h:
     18 	rm -f $@ ; \
     19 	trap "rm -f $$$$.h" 0 2 3; \
     20 	cat < ldflags.def.h > $$$$.h; \
     21 	mv $$$$.h $@
     22 
     23 syscrts.h:
     24 	rm -f $@ ; \
     25 	trap "rm -f $$$$.h" 0 2 3; \
     26 	sed 's,PREFIX,"$(PREFIX)",g' < syscrts.def.h > $$$$.h && \
     27 	mv $$$$.h $@
     28 
     29 sysincludes.h:
     30 	rm -f $@ ; \
     31 	trap "rm -f $$$$.h" 0 2 3; \
     32 	sed 's,PREFIX,"$(PREFIX)",g' < sysincludes.def.h > $$$$.h && \
     33 	mv $$$$.h $@
     34 
     35 syslibs.h:
     36 	rm -f $@ ; \
     37 	trap "rm -f $$$$.h" 0 2 3; \
     38 	sed 's,PREFIX,"$(PREFIX)",g' < syslibs.def.h > $$$$.h && \
     39 	mv $$$$.h $@
     40 
     41 distclean:
     42 	rm -f $(SYSHDR)