respect CC/CFLAGS, ok naddy@

This commit is contained in:
wilfried 2001-03-26 08:49:09 +00:00
parent 663a54074e
commit 03dc25d937
2 changed files with 17 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.4 2001/01/19 01:16:51 dbt Exp $
# $OpenBSD: Makefile,v 1.5 2001/03/26 08:49:09 wilfried Exp $
DISTNAME= lua-4.0
CATEGORIES= lang
@ -27,7 +27,7 @@ PERMIT_DISTFILES_FTP= Yes
WRKDIST= ${WRKDIR}/lua
post-build:
cd ${WRKDIST} && gcc -o bin/bin2c etc/bin2c.c
cd ${WRKDIST} && ${CC} ${CFLAGS} -o bin/bin2c etc/bin2c.c
# and recompile with shared libs
${BUILD_SHARED}
@ -49,7 +49,7 @@ do-install:
BUILD_SHARED=:
.else
BUILD_SHARED=cd ${WRKDIST} && \
gcc -shared -fpic -o lib/liblua.so.4.0 src/*.o && \
gcc -shared -fpic -o lib/liblualib.so.4.0 src/lib/*.o && \
${CC} ${LDFLAGS} -shared -fPIC -o lib/liblua.so.4.0 src/*.o && \
${CC} ${LDFLAGS} -shared -fPIC -o lib/liblualib.so.4.0 src/lib/*.o && \
rm bin/lua && ${MAKE}
.endif

View File

@ -1,11 +1,20 @@
--- config.orig Tue Nov 21 18:42:42 2000
+++ config Tue Nov 21 18:45:12 2000
@@ -93,7 +93,7 @@
--- config.orig Mon Nov 6 21:28:20 2000
+++ config Fri Mar 16 18:31:39 2001
@@ -28,7 +28,7 @@
# ------------------------------------------------------------------ C compiler
# You need an ANSI C compiler. gcc is a popular one.
-CC= gcc
+#CC= gcc
WARN= -ansi -pedantic -Wall
# On IRIX, cc is a good ANSI compiler.
@@ -93,7 +93,7 @@ LIB= $(LUA)/lib
INCS= -I$(INC) $(EXTRA_INCS)
DEFS= $(COMPAT) $(NUMBER) $(OLD_ANSI) $(EXTRA_DEFS)
-CFLAGS= -O2 $(WARN) $(INCS) $(DEFS)
+CFLAGS= -O2 -fpic $(WARN) $(INCS) $(DEFS)
+CFLAGS+= -fPIC $(WARN) $(INCS) $(DEFS)
V=4.0