scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

Makefile (736B)


      1 .POSIX:
      2 
      3 # Makefile is only used as a template for makefile.
      4 # If you modify Makefile remember to run make dep
      5 
      6 LIBDIR    = ../lib/scc
      7 include ../config.mk
      8 include $(LIBDIR)/libdep.mk
      9 
     10 MOREFLAGS = -I../inc/$(STD) $(CC2_CFLAGS)
     11 
     12 OBJ = main.o parser.o peep.o symbol.o node.o code.o optm.o
     13 HDR = cc2.h ../inc/$(STD)/cstd.h ../inc/scc.h
     14 
     15 all:
     16 	mkdir -p ../rootdir/libexec/scc/
     17 	cp cc2-* ../rootdir/libexec/scc/
     18 
     19 dep:
     20 	MKQBE=${MKQBE} ./gendep.sh $(TARGETS)
     21 
     22 $(LIBDIR)/libscc.a: $(LIB-OBJ)
     23 	cd $(LIBDIR) && $(MAKE)
     24 
     25 main.o: error.h
     26 
     27 error.h: cc2.h
     28 	rm -f $@; trap 'rm -f $$$$.h' EXIT INT QUIT ;\
     29 	awk -f generror.awk cc2.h > $$$$.h && mv $$$$.h $@
     30 
     31 clean:
     32 	rm -f *.o
     33 	rm -f target/*/*.o
     34 	rm -f cc2-* error.h
     35 
     36 distclean: clean
     37 	rm -f makefile