scc

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

rules.mk (538B)


      1 CINCLUDES =\
      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 $(CRT): crt.$O
     23 	cp crt.$O $@
     24 
     25 clean: clean-libc
     26 
     27 clean-libc: FORCE
     28 	rm -f *.6? *.7 *.8 *.z *.q
     29 
     30 .c.$O:
     31 	$(CC) $(PROJ_CFLAGS) -o $@ -c $<
     32 
     33 .s.$O:
     34 	$(AS) $(PROJ_ASFLAGS) $< -o $@