scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 8e13bbe043062699106c14de0977215607b3e514
parent 3434e20db04edbf858d3e128531b186c8aabcee0
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 17 Apr 2014 15:58:50 +0200

Change name of the executable

This program is going to be the front-end of other program, a
backend, so it is not logical use the name cc, or kcc for
this program.

Diffstat:
M.gitignore | 2+-
MMakefile | 9+++++----
Rcc.h -> cc1.h | 0
Mcode.c | 2+-
Mdecl.c | 2+-
Merror.c | 2+-
Mexpr.c | 2+-
Mlex.c | 2+-
Mmain.c | 2+-
Mstmt.c | 2+-
Msymbol.c | 2+-
Mtypes.c | 2+-
Mwrapper.c | 2+-
13 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,4 +1,4 @@ *.o makefile -kcc +cc1 TODO diff --git a/Makefile b/Makefile @@ -2,16 +2,17 @@ OBJS = types.o decl.o lex.o error.o symbol.o main.o expr.o \ wrapper.o code.o stmt.o -all: kcc -$(OBJS) : cc.h +all: cc1 -kcc: $(OBJS) +$(OBJS) : cc1.h + +cc1: $(OBJS) $(CC) $(LDFLAGS) $(CFLAGS) $(LIBS) $(OBJS) -o $@ clean: rm -f $(OBJS) - rm -f kcc + rm -f cc1 distclean: clean rm -f *~ diff --git a/cc.h b/cc1.h diff --git a/code.c b/code.c @@ -2,7 +2,7 @@ #include <stdint.h> #include <stdio.h> -#include "cc.h" +#include "cc1.h" char *opcodes[] = { [OADD] = "+", diff --git a/decl.c b/decl.c @@ -4,7 +4,7 @@ #include <string.h> #include "sizes.h" -#include "cc.h" +#include "cc1.h" #define ID_EXPECTED 1 #define ID_ACCEPTED 2 diff --git a/error.c b/error.c @@ -4,7 +4,7 @@ #include <stdint.h> #include <stdio.h> -#include "cc.h" +#include "cc1.h" extern unsigned linenum; extern unsigned columnum; diff --git a/expr.c b/expr.c @@ -1,7 +1,7 @@ #include <stdint.h> #include <stdio.h> -#include "cc.h" +#include "cc1.h" #define SWAP(x1, x2, t) (t = x1, x1 = x2, x2 = t) #define GETBTYPE(n, tp, t) ((t) = (tp = UNQUAL(n->type))->op) diff --git a/lex.c b/lex.c @@ -5,7 +5,7 @@ #include <string.h> #include <ctype.h> -#include "cc.h" +#include "cc1.h" #include "sizes.h" static FILE *yyin; diff --git a/main.c b/main.c @@ -3,7 +3,7 @@ #include <stdint.h> #include <stdio.h> -#include "cc.h" +#include "cc1.h" extern void init_keywords(void), open_file(const char *file), init_expr(void); diff --git a/stmt.c b/stmt.c @@ -2,7 +2,7 @@ #include <stddef.h> #include <stdint.h> -#include "cc.h" +#include "cc1.h" Symbol *curfun; diff --git a/symbol.c b/symbol.c @@ -4,7 +4,7 @@ #include <stdlib.h> #include <string.h> -#include "cc.h" +#include "cc1.h" #define NR_SYM_HASH 32 diff --git a/types.c b/types.c @@ -4,7 +4,7 @@ #include <string.h> #include "sizes.h" -#include "cc.h" +#include "cc1.h" #define NR_TYPE_HASH 16 diff --git a/wrapper.c b/wrapper.c @@ -4,7 +4,7 @@ #include <stdint.h> -#include "cc.h" +#include "cc1.h" static void