scc

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

rules.mk (1094B)


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