scc

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

Makefile (763B)


      1 .POSIX:
      2 
      3 PROJECTDIR = ../../../..
      4 include $(PROJECTDIR)/scripts/rules.mk
      5 
      6 MORE_CFLAGS = -I$(INCDIR)/$(STD)
      7 
      8 OBJS =\
      9 	main.o\
     10 	parser.o\
     11 	peep.o\
     12 	symbol.o\
     13 	node.o\
     14 	code.o\
     15 	optm.o\
     16 
     17 TARGET  =\
     18 	$(LIBEXEC)/scc/cc2-amd64-sysv\
     19 	$(LIBEXEC)/scc/cc2-i386-sysv\
     20 	$(LIBEXEC)/scc/cc2-qbe_amd64-sysv\
     21 	$(LIBEXEC)/scc/cc2-qbe_arm64-sysv\
     22 	$(LIBEXEC)/scc/cc2-z80-scc\
     23 
     24 all: $(TARGET)
     25 
     26 $(TARGET): error.h
     27 
     28 error.h: cc2.h
     29 	rm -f $@;\
     30 	trap 'r=$?;rm -f $$$$.h;exit $r' EXIT INT QUIT ;\
     31 	awk -f generror.awk cc2.h > $$$$.h && mv $$$$.h $@
     32 
     33 clean:
     34 	rm -f target/*/*.o error.h
     35 
     36 include target/amd64-sysv/target.mk
     37 include target/i386-sysv/target.mk
     38 include target/qbe_amd64-sysv/target.mk
     39 include target/qbe_arm64-sysv/target.mk
     40 include target/z80-scc/target.mk
     41 include deps.mk