forked from Lainports/opnsense-ports
Taken from: https://github.com/freebsd/freebsd-ports.git Commit id: 5070672073b68be364139bc6b3a89100bd17d331
58 lines
1.1 KiB
Text
58 lines
1.1 KiB
Text
--- src/Makefile.orig 2012-03-09 20:32:16.000000000 +0400
|
|
+++ src/Makefile 2012-12-14 16:39:47.000000000 +0400
|
|
@@ -6,12 +6,13 @@
|
|
# Your platform. See PLATS for possible values.
|
|
PLAT= none
|
|
|
|
-CC= gcc
|
|
-CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
|
|
+CC?= gcc
|
|
+CFLAGS= -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS)
|
|
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
|
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
|
|
|
-AR= ar rcu
|
|
+AR= ar
|
|
+ARFLAGS= rcu
|
|
RANLIB= ranlib
|
|
RM= rm -f
|
|
|
|
@@ -19,8 +20,8 @@
|
|
SYSLDFLAGS=
|
|
SYSLIBS=
|
|
|
|
-MYCFLAGS=
|
|
-MYLDFLAGS=
|
|
+MYCFLAGS?=
|
|
+MYLDFLAGS?=
|
|
MYLIBS=
|
|
MYOBJS=
|
|
|
|
@@ -38,12 +39,13 @@
|
|
|
|
LUA_T= lua
|
|
LUA_O= lua.o
|
|
+LUA_SO= liblua.so
|
|
|
|
LUAC_T= luac
|
|
LUAC_O= luac.o
|
|
|
|
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
|
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
|
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
|
|
ALL_A= $(LUA_A)
|
|
|
|
# Targets start here.
|
|
@@ -55,8 +57,11 @@
|
|
|
|
a: $(ALL_A)
|
|
|
|
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
|
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(MYLDFLAGS) -shared -Wl,-soname=$(LUA_SONAME) $?
|
|
+
|
|
$(LUA_A): $(BASE_O)
|
|
- $(AR) $@ $(BASE_O)
|
|
+ $(AR) $(ARFLAGS) $@ $(BASE_O)
|
|
$(RANLIB) $@
|
|
|
|
$(LUA_T): $(LUA_O) $(LUA_A)
|