scc

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

Makefile (1143B)


      1 .POSIX:
      2 
      3 DIRS =\
      4 	ppc\
      5 	x80\
      6 	x86\
      7 
      8 PROJECTDIR = ../../..
      9 include $(PROJECTDIR)/scripts/rules.mk
     10 
     11 OBJS = \
     12 	expr.o\
     13 	ins.o\
     14 	main.o\
     15 	parser.o\
     16 	symbol.o\
     17 
     18 TARGET =\
     19 	scc-as\
     20 	as-amd64\
     21 	as-i286\
     22 	as-i386\
     23 	as-ppc\
     24 	as-ppc64\
     25 	as-z80\
     26 
     27 MORE_LDLIBS =  -lscc -lmach
     28 
     29 all:
     30 	+@$(MAKE) $(DIRS)
     31 	+@$(MAKE) $(TARGET)
     32 	@cp as-* $(LIBEXEC)/scc
     33 	@cp scc-as $(BINDIR)
     34 
     35 $(DIRS): lexh
     36 $(TARGET): $(LIBSCC) $(LIBMACH)
     37 
     38 genhash.o: ../../libscc/genhash.c
     39 	$(HOSTCC) -c ../../libscc/genhash.c
     40 
     41 lexh.o: lexh.c
     42 	$(HOSTCC) -c lexh.c
     43 
     44 lexh: lexh.o genhash.o
     45 	$(HOSTCC) -o $@ lexh.o genhash.o
     46 
     47 as-ppc: $(OBJS) ppc/ppc.o
     48 	$(CC) $(PROJ_LDFLAGS) $(OBJS) ppc/ppc.o $(PROJ_LDLIBS) -o $@
     49 
     50 as-ppc64: $(OBJS) ppc/ppc64.o
     51 	$(CC) $(PROJ_LDFLAGS) $(OBJS) ppc/ppc64.o $(PROJ_LDLIBS) -o $@
     52 
     53 as-z80: $(OBJS) x80/z80.o
     54 	$(CC) $(PROJ_LDFLAGS) $(OBJS) x80/z80.o $(PROJ_LDLIBS) -o $@
     55 
     56 as-i286: $(OBJS) x86/i286.o
     57 	$(CC) $(PROJ_LDFLAGS) $(OBJS) x86/i286.o $(PROJ_LDLIBS) -o $@
     58 
     59 as-i386: $(OBJS) x86/i386.o
     60 	$(CC) $(PROJ_LDFLAGS) $(OBJS) x86/i386.o $(PROJ_LDLIBS) -o $@
     61 
     62 as-amd64: $(OBJS) x86/amd64.o
     63 	$(CC) $(PROJ_LDFLAGS) $(OBJS) x86/amd64.o $(PROJ_LDLIBS) -o $@
     64 
     65 clean:
     66 	rm -f lexh