[hackers] [scc] Move PREFIX to config.mk || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sun, 24 Jan 2016 16:19:20 +0100 (CET)

commit 5ae8cb41158a3af9db313ff45d98c20735231ec9
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jan 24 10:11:44 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jan 24 10:11:44 2016 +0100

    Move PREFIX to config.mk
    
    This prefix needs to be the same for all the toolchain.

diff --git a/cc1/cc1.h b/cc1/cc1.h
index efd4f61..5f3fcc7 100644
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
_AT_@ -1,9 +1,6 @@
 
 
 #define INPUTSIZ LINESIZ
-#ifndef PREFIX
-#define PREFIX "/usr/"
-#endif
 
 #define GLOBALCTX 0
 
diff --git a/cc1/cpp.c b/cc1/cpp.c
index 2eca5f1..117c366 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
_AT_@ -11,10 +11,6 @@
 #include "arch.h"
 #include "cc1.h"
 
-#ifndef PREFIX
-#define PREFIX "/usr/include/local"
-#endif
-
 static char *argp, *macroname;
 static unsigned arglen;
 static Symbol *symline, *symfile;
diff --git a/config.mk b/config.mk
index c989e5f..7c70dc2 100644
--- a/config.mk
+++ b/config.mk
_AT_@ -8,10 +8,11 @@ ARCH = z80
 PREFIX = /usr/local/
 MANPREFIX = ${PREFIX}/share/man
 
-CC = cc
+# if your system is not POSIX maybe you want to use cc or gcc
+CC = c99
 LD = $(CC)
 AR = ar
 
 # for Plan9 add -D_SUSV2_SOURCE -DNBOOL
-CFLAGS = -DNDEBUG -Iarch/$(ARCH) -O2 -std=c99
+CFLAGS = -DNDEBUG -Iarch/$(ARCH) -DPREFIX=\""$(PREFIX)"\"
 LDFLAGS = -s
diff --git a/inc/cc.h b/inc/cc.h
index bcab69e..3f15316 100644
--- a/inc/cc.h
+++ b/inc/cc.h
_AT_@ -16,6 +16,10 @@ extern int debug;
 #define DBGON()
 #endif
 
+#ifndef PREFIX
+#define PREFIX "/usr/local/"
+#endif
+
 extern void die(const char *fmt, ...);
 extern void dbg(const char *fmt, ...);
 extern void *xmalloc(size_t size);
Received on Sun Jan 24 2016 - 16:19:20 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 24 2016 - 16:24:28 CET