scc

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

Makefile (1236B)


      1 .POSIX:
      2 
      3 PROJECTDIR = ../..
      4 include $(PROJECTDIR)/scripts/rules.mk
      5 
      6 TARGET = $(BINDIR)/nm \
      7          $(BINDIR)/strip \
      8          $(BINDIR)/size \
      9          $(BINDIR)/ar \
     10          $(BINDIR)/ranlib \
     11          $(BINDIR)/objdump \
     12          $(BINDIR)/objcopy \
     13          $(BINDIR)/addr2line \
     14 
     15 DIRS   = ld as scc
     16 
     17 LIBMACH = $(LIBDIR)/libmach.a
     18 LIBSCC  = $(LIBDIR)/libscc.a
     19 
     20 all: $(TARGET) $(DIRS)
     21 
     22 $(DIRS): FORCE
     23 	+@cd $@ && $(MAKE)
     24 
     25 $(BINDIR)/nm: nm.o $(LIBMACH) $(LIBSCC)
     26 	$(CC) $(SCC_LDFLAGS) nm.o -lmach -lscc -o $@
     27 
     28 $(BINDIR)/strip: strip.o $(LIBMACH) $(LIBSCC)
     29 	$(CC) $(SCC_LDFLAGS) strip.o -lmach -lscc -o $@
     30 
     31 $(BINDIR)/size: size.o $(LIBMACH) $(LIBSCC)
     32 	$(CC) $(SCC_LDFLAGS) size.o -lmach -lscc -o $@
     33 
     34 $(BINDIR)/ranlib: ranlib.o $(DRIVER).o $(LIBMACH) $(LIBSCC)
     35 	$(CC) $(SCC_LDFLAGS) ranlib.o $(DRIVER).o -lmach -lscc -o $@
     36 
     37 $(BINDIR)/objdump: objdump.o $(LIBMACH)
     38 	$(CC) $(SCC_LDFLAGS) objdump.o -lmach -o $@
     39 
     40 $(BINDIR)/objcopy: objcopy.o $(LIBMACH)
     41 	$(CC) $(SCC_LDFLAGS) objcopy.o -lmach -o $@
     42 
     43 $(BINDIR)/addr2line: addr2line.o $(LIBMACH) $(LIBSCC)
     44 	$(CC) $(SCC_LDFLAGS) addr2line.o -lmach -lscc -o $@
     45 
     46 $(BINDIR)/ar: ar.o $(DRIVER).o
     47 	$(CC) $(SCC_LDFLAGS) ar.o $(DRIVER).o -o $@
     48 
     49 dep: inc-dep
     50 
     51 dep clean:
     52 	$(FORALL)
     53 
     54 include deps.mk