changeset 504:e3ca505c9c66

Fix ./make --clean and prepare to do surgery on library and include path logic.
author Rob Landley <rob@landley.net>
date Sat, 10 Nov 2007 13:19:40 -0600
parents 4a27c24f8283
children 9311fc3f8e39
files make
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/make	Tue Nov 06 03:57:56 2007 -0600
+++ b/make	Sat Nov 10 13:19:40 2007 -0600
@@ -11,6 +11,8 @@
 [ -z "$CFLAGS" ] && CFLAGS="-g -Wall -fsigned-char -Os -fno-strict-aliasing"
 [ -z "$LIBS" ] && LIBS="-lm -ldl"
 [ -z "$ARCH" ] && ARCH="i386 arm c67 win32"
+[ -z "$TINYCC_LIBS" ] && TINYCC_LIBS=/lib
+[ -z "$TINYCC_INCLUDES" ] && TINYCC_INCLUDES=/usr/include
 
 TINYCC_VERSION=1.2.3
 
@@ -35,10 +37,10 @@
 if [ "$1" == "--clean" ]
 then
   # Need to figure out how much of this is needed...
-  rm -f *~ *.o *.a tinycc tinycc_unstripped tinycc.1 tcct tcc_g tcctest.ref
-        *.bin *.i ex2 core gmon.out test.out test.ref a.out tcc_p \
-           *.exe *.lib tcc.pod libtcc_test i386/*.o \
-           tcctest[1234] test[1234].out tcc win32/lib/*.o
+  rm -f *~ *.o *.a *-tinycc *-tinycc_unstripped tinycc.1 tcct tcc_g \
+        tcctest.ref *.bin *.i ex2 core gmon.out test.out test.ref a.out tcc_p \
+        *.exe *.lib tcc.pod libtcc_test i386/*.o \
+        tcctest[1234] test[1234].out tcc win32/lib/*.o
   exit 0
 fi
 
@@ -50,8 +52,10 @@
 
   [ "$1" == "--fast" ] && [ "$i" != "$HOST" ] && continue
 
-  $CC $CFLAGS $LIBS -DTCC_TARGET_$i '-DCC_LIB_PATH="/blah"' \
-    -DTINYCC_VERSION='"'$TINYCC_VERSION'"' \
+  $CC $CFLAGS $LIBS -DTCC_TARGET_$i \
+    '-DCC_LIB_PATH="'"$TINYCC_LIBS"'"' \
+    '-DTINYCC_INCLUDES="'"$TINYCC_INCLUDES"'"' \
+    '-DTINYCC_VERSION="'"$TINYCC_VERSION"'"' \
     -o ${i}-tinycc_unstripped tcc.c &&
   $STRIP ${i}-tinycc_unstripped -o ${i}-tinycc
   [ $? -ne 0 ] && exit 1