scc

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

rules.mk (1024B)


      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 
      9 SYSERRNO = $(INCDIR)/bits/$(SYS)/sys/errno.h
     10 
     11 LIBC = $(LIBCDIR)/libc.a
     12 CRT = $(LIBCDIR)/crt.o
     13 
     14 # Rules
     15 
     16 .SUFFIXES: .6 .7 .8 .z .q .6d
     17 
     18 _sys_errlist.c: $(SYSERRNO)
     19 	../../mkerrstr $(SYSERRNO)
     20 
     21 $(CRT): crt.$O
     22 	cp crt.$O $@
     23 
     24 clean: clean-libc
     25 
     26 clean-libc: FORCE
     27 	rm -f *.6d *.6 *.7 *.8 *.z *.q
     28 
     29 # amd64-posix objects
     30 .c.6:
     31 	$(CC) $(PROJ_CFLAGS) -o $@ -c $<
     32 
     33 .s.6:
     34 	$(AS) $(PROJ_ASFLAGS) $< -o $@
     35 
     36 # amd64-darwin objects
     37 .c.6d:
     38 	$(CC) $(PROJ_CFLAGS) -o $@ -c $<
     39 
     40 .s.6d:
     41 	$(AS) $(PROJ_ASFLAGS) $< -o $@
     42 
     43 # arm64-posix objects
     44 .c.7:
     45 	$(CC) $(PROJ_CFLAGS) -o $@ -c $<
     46 
     47 .s.7:
     48 	$(AS) $(PROJ_ASFLAGS) $< -o $@
     49 
     50 # 386-posix objects
     51 .c.8:
     52 	$(CC) $(PROJ_CFLAGS) -o $@ -c $<
     53 
     54 .s.8:
     55 	$(AS) $(PROJ_ASFLAGS) $< -o $@
     56 
     57 # z80 objects
     58 .c.z:
     59 	$(CC) $(PROJ_CFLAGS) -o $@ -c $<
     60 
     61 .s.z:
     62 	$(AS) $(PROJ_ASFLAGS) $< -o $@
     63 
     64 # ppc32 objects
     65 .c.q:
     66 	$(CC) $(PROJ_CFLAGS) -o $@ -c $<
     67 
     68 .s.q:
     69 	$(AS) $(PROJ_ASFLAGS) $< -o $@