scc

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

Makefile (664B)


      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 =\
     16 	$(BINDIR)/scc-cc\
     17 	$(BINDIR)/scc-cpp\
     18 	$(BINDIR)/scc\
     19 
     20 all: $(TARGETS)
     21 
     22 $(BINDIR)/scc-cc: $(LIBSCC) cc.o
     23 	$(CC) $(PROJ_LDFLAGS) cc.o -lscc -o $@
     24 
     25 $(BINDIR)/scc-cpp: scc.sh
     26 	cp scc.sh $@
     27 	chmod +x $@
     28 
     29 $(BINDIR)/scc: scc.sh
     30 	cp scc.sh $@
     31 	chmod +x $@
     32 
     33 config.h:
     34 	PREFIX=$(PREFIX) ./mkconf $(SYSLST)
     35 
     36 clean:
     37 	rm -f scc scpp *.o
     38 	rm -f $(TARGETS)
     39 	rm -f config.h
     40 
     41 include deps.mk