scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit f9f461db2531e5034f729c784bf7ad9dd0cdeaa3
parent 348cbf56cdf4a39bf18b451ecd32e2df57b86fb1
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 13 Feb 2015 17:20:50 +0100

Remove the -I flag in the compilation process

This flag is not needed at all because we can use the route
to the inclussion file. The content of "" or <> is totally
dependant of the compiler, so we are not reducing the
portability at all.

Diffstat:
cc1/Makefile | 2+-
cc1/code.c | 2+-
cc1/decl.c | 4++--
cc1/error.c | 2+-
cc1/expr.c | 2+-
cc1/lex.c | 4++--
cc1/main.c | 2+-
cc1/stmt.c | 2+-
cc1/symbol.c | 2+-
cc1/types.c | 4++--
cc2/Makefile | 2+-
cc2/cgen.c | 2+-
cc2/code.c | 2+-
cc2/main.c | 2+-
cc2/optm.c | 2+-
cc2/parser.c | 4++--
lib/Makefile | 1-
lib/die.c | 2+-
lib/xcalloc.c | 2+-
lib/xmalloc.c | 2+-
lib/xrealloc.c | 2+-
lib/xstrdup.c | 2+-
22 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/cc1/Makefile b/cc1/Makefile @@ -2,7 +2,7 @@ OBJS = types.o decl.o lex.o error.o symbol.o main.o expr.o \ code.o stmt.o -CPPFLAGS = -I../inc +CPPFLAGS = LDFLAGS = -L../lib LIBS = -lcc diff --git a/cc1/code.c b/cc1/code.c @@ -3,7 +3,7 @@ #include <stdio.h> #include <stdlib.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc1.h" #define SYM(s) ((union unode) {.sym = s}) diff --git a/cc1/decl.c b/cc1/decl.c @@ -3,8 +3,8 @@ #include <stdint.h> #include <string.h> -#include <sizes.h> -#include <cc.h> +#include "../inc/sizes.h" +#include "../inc/cc.h" #include "cc1.h" #define ID_EXPECTED 1 diff --git a/cc1/error.c b/cc1/error.c @@ -4,7 +4,7 @@ #include <stdint.h> #include <stdio.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc1.h" extern unsigned linenum; diff --git a/cc1/expr.c b/cc1/expr.c @@ -2,7 +2,7 @@ #include <stdio.h> #include <string.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc1.h" static Symbol *zero, *one; diff --git a/cc1/lex.c b/cc1/lex.c @@ -5,8 +5,8 @@ #include <string.h> #include <ctype.h> -#include <sizes.h> -#include <cc.h> +#include "../inc/sizes.h" +#include "../inc/cc.h" #include "cc1.h" static FILE *yyin; diff --git a/cc1/main.c b/cc1/main.c @@ -2,7 +2,7 @@ #include <stdint.h> #include <stdio.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc1.h" extern void init_keywords(void), diff --git a/cc1/stmt.c b/cc1/stmt.c @@ -3,7 +3,7 @@ #include <stdint.h> #include <stdio.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc1.h" struct scase { diff --git a/cc1/symbol.c b/cc1/symbol.c @@ -4,7 +4,7 @@ #include <stdlib.h> #include <string.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc1.h" #define NR_SYM_HASH 32 diff --git a/cc1/types.c b/cc1/types.c @@ -4,8 +4,8 @@ #include <stdlib.h> #include <string.h> -#include <sizes.h> -#include <cc.h> +#include "../inc/sizes.h" +#include "../inc/cc.h" #include "cc1.h" #define NR_TYPE_HASH 16 diff --git a/cc2/Makefile b/cc2/Makefile @@ -1,7 +1,7 @@ OBJS = main.o parser.o cgen.o code.o optm.o -CPPFLAGS = -I../inc +CPPFLAGS = LDFLAGS = -L../lib LIBS = -lcc diff --git a/cc2/cgen.c b/cc2/cgen.c @@ -4,7 +4,7 @@ #include <stdint.h> #include <stdlib.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc2.h" #include <stdio.h> diff --git a/cc2/code.c b/cc2/code.c @@ -5,7 +5,7 @@ #include <stdint.h> #include <stdio.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc2.h" diff --git a/cc2/main.c b/cc2/main.c @@ -4,7 +4,7 @@ #include <stdio.h> #include <stdlib.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc2.h" #include "error.h" diff --git a/cc2/optm.c b/cc2/optm.c @@ -2,7 +2,7 @@ #include <stddef.h> #include <stdint.h> -#include <cc.h> +#include "../inc/cc.h" #include "cc2.h" diff --git a/cc2/parser.c b/cc2/parser.c @@ -5,8 +5,8 @@ #include <stdlib.h> #include <string.h> -#include <cc.h> -#include <sizes.h> +#include "../inc/cc.h" +#include "../inc/sizes.h" #include "cc2.h" diff --git a/lib/Makefile b/lib/Makefile @@ -1,6 +1,5 @@ OBJS = die.o xcalloc.o xmalloc.o xrealloc.o xstrdup.o -CPPFLAGS = -I../inc all: libcc.a($(OBJS)) diff --git a/lib/die.c b/lib/die.c @@ -3,7 +3,7 @@ #include <stdlib.h> #include <stdio.h> -#include <cc.h> +#include "../inc/cc.h" void die(const char *fmt, ...) diff --git a/lib/xcalloc.c b/lib/xcalloc.c @@ -1,6 +1,6 @@ #include <stdlib.h> -#include <cc.h> +#include "../inc/cc.h" void * xcalloc(size_t n, size_t size) diff --git a/lib/xmalloc.c b/lib/xmalloc.c @@ -1,6 +1,6 @@ #include <stdlib.h> -#include <cc.h> +#include "../inc/cc.h" void * xmalloc(size_t size) diff --git a/lib/xrealloc.c b/lib/xrealloc.c @@ -1,6 +1,6 @@ #include <stdlib.h> -#include <cc.h> +#include "../inc/cc.h" void * xrealloc(void *buff, register size_t size) diff --git a/lib/xstrdup.c b/lib/xstrdup.c @@ -1,6 +1,6 @@ #include <string.h> -#include <cc.h> +#include "../inc/cc.h" char * xstrdup(const char *s)