scc

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

rules.mk (626B)


      1 CPPINCLUDES =\
      2 	-I$(INCDIR)\
      3 	-I$(INCDIR)/bits/$(SYS)\
      4 	-I$(INCDIR)/bits/$(ARCH)\
      5 	-I$(INCDIR)/bits/$(SYS)/$(ARCH)\
      6 
      7 MORE_ARFLAGS = -u
      8 MORE_CFLAGS = $(TOOL_LIBC_CFLAGS) $(NOPIE_CFLAGS)
      9 
     10 SYSERRNO = $(INCDIR)/bits/$(SYS)/sys/errno.h
     11 
     12 LIBC = $(LIBCDIR)/libc.a
     13 CRT = $(LIBCDIR)/crt.o
     14 
     15 # Rules
     16 
     17 .SUFFIXES: .$O
     18 
     19 _sys_errlist.c: $(SYSERRNO)
     20 	../../mkerrstr $(SYSERRNO)
     21 
     22 _sys_errlist.$O: _sys_errlist.c
     23 	$(CC) $(PROJ_CFLAGS) -c -o $@ _sys_errlist.c
     24 
     25 $(CRT): crt.$O
     26 	cp crt.$O $@
     27 
     28 clean: clean-libc
     29 
     30 clean-libc: FORCE
     31 	rm -f *.5? *.6? *.7? *.8? *.z *.q
     32 
     33 .c.$O:
     34 	$(CC) $(PROJ_CFLAGS) -o $@ -c $<
     35 
     36 .s.$O:
     37 	$(AS) $(PROJ_ASFLAGS) $< -o $@