scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

Makefile (563B)


      1 # See LICENSE file for copyright and license details.
      2 .POSIX:
      3 
      4 include ../config.mk
      5 
      6 OBJS = types.o decl.o lex.o error.o symbol.o main.o expr.o \
      7 	code.o stmt.o cpp.o fold.o init.o arch/$(ARCH)/arch.o
      8 
      9 all: cc1
     10 
     11 ../inc/sizes.h:
     12 	cp ../inc/sizes_$(STD).h $@
     13 
     14 cpp.o: stallman.msg
     15 
     16 $(OBJS): cc1.h ../inc/cc.h ../inc/sizes.h arch/$(ARCH)/arch.h
     17 
     18 ../lib/libcc.a:
     19 	cd ../lib && $(MAKE) -e
     20 
     21 cc1: $(OBJS) ../lib/libcc.a
     22 	$(CC) $(SCC_LDFLAGS) $(OBJS) ../lib/libcc.a -o $@
     23 
     24 cpp: cc1
     25 	ln -f cc1 cpp
     26 
     27 test:
     28 	cd tests && ./chktest.sh *.c
     29 
     30 clean:
     31 	rm -f $(OBJS)
     32 	rm -f cc1 cpp