scc

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

Makefile (685B)


      1 .POSIX:
      2 
      3 PROJECTDIR = ../../../..
      4 include $(PROJECTDIR)/scripts/rules.mk
      5 
      6 # SYSLST is a list of backend-arch-abi-sys. First
      7 # element of the list becomes the default target
      8 
      9 SYSLST  =\
     10 	amd64-sysv-linux-elf\
     11 	z80-scc-none-none\
     12 	i386-sysv-linux-elf\
     13 	amd64-sysv-openbsd-elf\
     14 
     15 TARGETS = $(BINDIR)/cc $(BINDIR)/cpp
     16 
     17 all: $(TARGETS)
     18 
     19 $(BINDIR)/cc: cc.o
     20 	$(CC) $(SCC_LDFLAGS) cc.o -lscc -o $@
     21 
     22 $(BINDIR)/cpp: cpp.sh
     23 	trap "rm -f $$$$.sh" 0 2 3;\
     24 	rm -f $@ ;\
     25 	sed "s%@PREFIX@%$(PREFIX)%" < cpp.sh > $$$$.sh && \
     26 	chmod +x $$$$.sh && \
     27 	mv $$$$.sh $@
     28 
     29 config.h:
     30 	PREFIX=$(PREFIX) mkconf $(SYSLST)
     31 
     32 dep: inc-dep
     33 
     34 clean:
     35 	rm -f scc scpp *.o
     36 	rm -f $(TARGETS)
     37 	rm -f config.h
     38 
     39 include deps.mk