scc

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

Makefile (718B)


      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  = amd64-sysv-linux-elf z80-scc-none-none \
     10           i386-sysv-linux-elf amd64-sysv-openbsd-elf
     11 
     12 STDCFLAGS =
     13 
     14 TARGETS = $(BINDIR)/scc $(BINDIR)/scpp
     15 
     16 all: $(TARGETS)
     17 
     18 $(BINDIR)/scc: scc.o
     19 	$(CC) $(SCC_LDFLAGS) scc.o -lscc -o $@
     20 
     21 $(BINDIR)/scpp: cpp.sh
     22 	set -x ;\
     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