scc

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

defaults.c (1027B)


      1 char defaults[] = 
      2 	".SUFFIXES: .o .c .y .l .a .sh .f\n"
      3 
      4 	"AR = ar\n"
      5 	"ARFLAGS = -rv\n"
      6 	"CC = c99\n"
      7 	"CFLAGS = -O\n"
      8 	"FC = fort77\n"
      9 	"FFLAGS = -O 1\n"
     10 	"LDFLAGS =\n"
     11 	"LEX = lex\n"
     12 	"LFLAGS =\n"
     13 	"YACC = yacc\n"
     14 	"YFLAGS =\n"
     15 	"SHELL = /bin/sh\n"
     16 
     17 	".c:\n"
     18 	"\t${CC} ${CFLAGS} ${LDFLAGS} -o $@ $<\n"
     19 
     20 	".f:\n"
     21 	"\t${FC} ${FFLAGS} ${LDFLAGS} -o $@ $<\n"
     22 
     23 	".sh:\n"
     24 	"\tcp $< $@\n"
     25 	"\tchmod a+x $@\n"
     26 
     27 	".c.o:\n"
     28 	"\t${CC} ${CFLAGS} -c $<\n"
     29 
     30 	".f.o:\n"
     31 	"\t${FC} ${FFLAGS} -c $<\n"
     32 
     33 	".y.o:\n"
     34 	"\t${YACC} ${YFLAGS} $<\n"
     35 	"\t${CC} ${CFLAGS} -c y.tab.c\n"
     36 	"\trm -f y.tab.c\n"
     37 	"\tmv y.tab.o $@\n"
     38 
     39 	".l.o:\n"
     40 	"\t${LEX} ${LFLAGS} $<\n"
     41 	"\t${CC} ${CFLAGS} -c lex.yy.c\n"
     42 	"\trm -f lex.yy.c\n"
     43 	"\tmv lex.yy.o $@\n"
     44 
     45 	".y.c:\n"
     46 	"\t${YACC} ${YFLAGS} $<\n"
     47 	"\tmv y.tab.c $@\n"
     48 
     49 	".l.c:\n"
     50 	"\t${LEX} ${LFLAGS} $<\n"
     51 	"\tmv lex.yy.c $@\n"
     52 
     53 	".c.a:\n"
     54 	"\t${CC} -c ${CFLAGS} $<\n"
     55 	"\t${AR} ${ARFLAGS} $@ $*.o\n"
     56 	"\trm -f $*.o\n"
     57 
     58 	".f.a:\n"
     59 	"\t${FC} -c ${FFLAGS} $<\n"
     60 	"\t${AR} ${ARFLAGS} $@ $*.o\n"
     61 	"\trm -f $*.o\n";