scc

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

Makefile (1055B)


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