scc

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

Makefile (794B)


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