scc

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

Makefile (1280B)


      1 .POSIX:
      2 
      3 DIRS   =\
      4 	qbe\
      5 	ld\
      6 	as\
      7 	cc\
      8 
      9 PROJECTDIR = ../..
     10 include $(PROJECTDIR)/scripts/rules.mk
     11 
     12 TARGET =\
     13 	$(BINDIR)/scc-nm\
     14 	$(BINDIR)/scc-ar\
     15 	$(BINDIR)/scc-strip\
     16 	$(BINDIR)/scc-size\
     17 	$(BINDIR)/scc-ranlib\
     18 	$(BINDIR)/scc-objdump\
     19 	$(BINDIR)/scc-objcopy\
     20 	$(BINDIR)/scc-addr2line\
     21 	$(LIBEXEC)/scc/qbe\
     22 
     23 all: $(TARGET) $(DIRS)
     24 
     25 qbe/.git:
     26 	git submodule init qbe
     27 	git submodule update qbe
     28 
     29 qbe: qbe/.git
     30 
     31 qbe/qbe: qbe
     32 
     33 $(LIBEXEC)/scc/qbe: qbe/qbe
     34 	cp qbe/qbe $@
     35 
     36 $(BINDIR)/scc-nm: nm.o $(LIBMACH) $(LIBSCC)
     37 	$(CC) $(PROJ_LDFLAGS) nm.o -lmach -lscc -o $@
     38 
     39 $(BINDIR)/scc-strip: strip.o $(LIBMACH) $(LIBSCC)
     40 	$(CC) $(PROJ_LDFLAGS) strip.o -lmach -lscc -o $@
     41 
     42 $(BINDIR)/scc-size: size.o $(LIBMACH) $(LIBSCC)
     43 	$(CC) $(PROJ_LDFLAGS) size.o -lmach -lscc -o $@
     44 
     45 $(BINDIR)/scc-ranlib: ranlib.o $(DRIVER).o $(LIBMACH) $(LIBSCC)
     46 	$(CC) $(PROJ_LDFLAGS) ranlib.o $(DRIVER).o -lmach -lscc -o $@
     47 
     48 $(BINDIR)/scc-objdump: objdump.o $(LIBMACH)
     49 	$(CC) $(PROJ_LDFLAGS) objdump.o -lmach -o $@
     50 
     51 $(BINDIR)/scc-objcopy: objcopy.o $(LIBMACH)
     52 	$(CC) $(PROJ_LDFLAGS) objcopy.o -lmach -o $@
     53 
     54 $(BINDIR)/scc-addr2line: addr2line.o $(LIBMACH) $(LIBSCC)
     55 	$(CC) $(PROJ_LDFLAGS) addr2line.o -lmach -lscc -o $@
     56 
     57 $(BINDIR)/scc-ar: ar.o $(DRIVER).o
     58 	$(CC) $(PROJ_LDFLAGS) ar.o $(DRIVER).o -o $@
     59 
     60 include deps.mk