about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile12
-rw-r--r--src/luasec/Makefile22
-rw-r--r--src/luasocket/makefile2
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
8'>258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403