diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 12 | ||||
-rw-r--r-- | src/luasec/Makefile | 22 | ||||
-rw-r--r-- | src/luasocket/makefile | 2 |
3 files changed, 17 insertions, 19 deletions
diff --git a/src/Makefile b/src/Makefile index 1d36c93..5bb7761 100644 --- a/src/Makefile +++ b/src/Makefile @@ -53,18 +53,14 @@ $(LUA_A): $(CORE_O) $(LIB_O) $(AR) $@ $(CORE_O) $(LIB_O) $(RANLIB) $@ -$(LUA_T): $(LUA_O) $(LUA_A) luasocket/socket.a luasocket/mime.a luasec/ssl.a +$(LUA_T): $(LUA_O) $(LUA_A) + make -C luasocket linux + make -C luasec linux $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) luasocket/socket.a luasocket/mime.a luasec/ssl.a $(LIBS) $(LUAC_T): $(LUAC_O) $(LUA_A) $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) -luasocket/socket.a luasocket/mime.a: - make -C luasocket linux - -luasec/ssl.a: - make -C luasec linux - clean: make -C luasocket clean make -C luasec clean @@ -126,7 +122,7 @@ solaris: $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" # list targets that do not create files (but not all makes understand .PHONY) -.PHONY: all $(PLATS) default o a clean depend echo none luasocket/socket.a luasocket/mime.a luasec/ssl.a +.PHONY: all $(PLATS) default o a clean depend echo none # DO NOT DELETE diff --git a/src/luasec/Makefile b/src/luasec/Makefile index c495109..c3ae3c6 100644 --- a/src/luasec/Makefile +++ b/src/luasec/Makefile @@ -11,20 +11,19 @@ OBJS= \ WARN=-Wall -Wpedantic -Wshadow -BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS) -BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR) +BSD_CFLAGS=-O2 -fPIC $(WARN) $(DEFS) +BSD_LDFLAGS=-O -fPIC -shared -linux_CFLAGS=-g -O2 $(WARN) $(INCDIR) $(DEFS) +linux_CFLAGS=-g -O2 $(WARN) $(DEFS) macosx_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)' -macosx_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS) -macosx_LDFLAGS=-bundle -undefined dynamic_lookup $(LIBDIR) +macosx_CFLAGS=-O2 -fno-common $(WARN) $(DEFS) +macosx_LDFLAGS=-bundle -undefined dynamic_lookup INSTALL = install CC ?= gcc CCLD ?= $(MYENV) $(CC) -CFLAGS = $(linux_CFLAGS) -CFLAGS += $(MYCFLAGS) +CFLAGS = $(MYCFLAGS) LDFLAGS += $(MYLDFLAGS) AR= ar rc RANLIB= ranlib @@ -39,9 +38,8 @@ install: $(CMOD) $(LMOD) $(INSTALL) -m644 $(LMOD) $(DESTDIR)$(LUAPATH) $(INSTALL) -m644 https.lua $(DESTDIR)$(LUAPATH)/ssl -linux: $(OBJS) - $(AR) $(CMOD) $(OBJS) - $(RANLIB) $(CMOD) +linux: + @$(MAKE) $(CMOD) MYCFLAGS="$(linux_CFLAGS)" MYLDFLAGS="$(linux_LDFLAGS)" EXTRA="$(EXTRA)" bsd: @$(MAKE) $(CMOD) MYCFLAGS="$(BSD_CFLAGS)" MYLDFLAGS="$(BSD_LDFLAGS)" EXTRA="$(EXTRA)" @@ -49,6 +47,10 @@ bsd: macosx: @$(MAKE) $(CMOD) MYCFLAGS="$(macosx_CFLAGS)" MYLDFLAGS="$(macosx_LDFLAGS)" MYENV="$(macosx_ENV)" EXTRA="$(EXTRA)" +$(CMOD): $(OBJS) + $(AR) $(CMOD) $(OBJS) + $(RANLIB) $(CMOD) + clean: rm -f $(OBJS) $(CMOD) diff --git a/src/luasocket/makefile b/src/luasocket/makefile index f6548d9..0772a2b 100644 --- a/src/luasocket/makefile +++ b/src/luasocket/makefile @@ -174,7 +174,7 @@ SO_linux=so O_linux=o CC_linux=gcc DEF_linux=-DLUASOCKET_$(DEBUG) -CFLAGS_linux= -g -O2 -Wall -Wpedantic -Wshadow -Wextra $(LUAINC:%=-I%) $(DEF) +CFLAGS_linux= -g -O2 -Wall -Wpedantic -Wshadow -Wextra $(DEF) LDFLAGS_linux= -o LD_linux=ld SOCKET_linux=usocket.o |