From ddc546654041db461661773e9346fcbeb199719a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 26 Sep 2015 23:29:50 +0200 Subject: util-src/Makefile: Move list of .so files in a variable --- util-src/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'util-src') diff --git a/util-src/Makefile b/util-src/Makefile index 3674975c..1f092b1e 100644 --- a/util-src/Makefile +++ b/util-src/Makefile @@ -11,18 +11,18 @@ CXX?=g++ LD?=gcc CFLAGS+=-ggdb +ALL=encodings.so hashes.so net.so pposix.so signal.so table.so + .PHONY: all install clean .SUFFIXES: .c .o .so -all: encodings.so hashes.so net.so pposix.so signal.so table.so +all: $(ALL) -install: encodings.so hashes.so net.so pposix.so signal.so table.so - install *.so ../util/ +install: $(ALL) + install $^ ../util/ clean: - rm -f *.o - rm -f *.so - rm -f ../util/*.so + rm -f $(ALL) encodings.so: encodings.o MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; -- cgit v1.2.3 From 321cfea3f348b4dd902d8a444c800a288578fffc Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 26 Sep 2015 23:38:09 +0200 Subject: util-src/Makefile: Use variables for install binary and target directory --- util-src/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'util-src') diff --git a/util-src/Makefile b/util-src/Makefile index 1f092b1e..d99c9515 100644 --- a/util-src/Makefile +++ b/util-src/Makefile @@ -11,6 +11,9 @@ CXX?=g++ LD?=gcc CFLAGS+=-ggdb +INSTALL_DATA=install -m644 +TARGET?=../util/ + ALL=encodings.so hashes.so net.so pposix.so signal.so table.so .PHONY: all install clean @@ -19,7 +22,7 @@ ALL=encodings.so hashes.so net.so pposix.so signal.so table.so all: $(ALL) install: $(ALL) - install $^ ../util/ + $(INSTALL_DATA) $^ $(TARGET) clean: rm -f $(ALL) -- cgit v1.2.3 From 1ea718fb813a295219492f3a23d5f733bc71e5be Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 26 Sep 2015 23:42:46 +0200 Subject: configure, util-src/Makefile: Move OS X deployment flag to an C compiler argument set by configure --- util-src/Makefile | 3 --- 1 file changed, 3 deletions(-) (limited to 'util-src') diff --git a/util-src/Makefile b/util-src/Makefile index d99c9515..8cf3b876 100644 --- a/util-src/Makefile +++ b/util-src/Makefile @@ -28,17 +28,14 @@ clean: rm -f $(ALL) encodings.so: encodings.o - MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) -o $@ $< $(LDFLAGS) $(IDNA_LIBS) hashes.so: hashes.o - MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) -o $@ $< $(LDFLAGS) -l$(OPENSSL_LIB) .c.o: $(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o $@ $< .o.so: - MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(LD) -o $@ $< $(LDFLAGS) -- cgit v1.2.3 From 0941a2d8f4d0cd675c5b35f6da188bcf16eefb72 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 27 Sep 2015 00:04:14 +0200 Subject: util-src/Makefile: Move Lua include path into CFLAGS variable --- util-src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util-src') diff --git a/util-src/Makefile b/util-src/Makefile index 8cf3b876..91c60d7f 100644 --- a/util-src/Makefile +++ b/util-src/Makefile @@ -9,7 +9,7 @@ OPENSSL_LIB?=crypto CC?=gcc CXX?=g++ LD?=gcc -CFLAGS+=-ggdb +CFLAGS+=-ggdb -I$(LUA_INCDIR) INSTALL_DATA=install -m644 TARGET?=../util/ @@ -34,7 +34,7 @@ hashes.so: hashes.o $(CC) -o $@ $< $(LDFLAGS) -l$(OPENSSL_LIB) .c.o: - $(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< .o.so: $(LD) -o $@ $< $(LDFLAGS) -- cgit v1.2.3 From ffa983b26574bdf668422a1f152f52004e1ede9c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 27 Sep 2015 00:08:46 +0200 Subject: util-src/Makefile: Tell Make how to build .so from .o in a modern way (Let built-in rules handle .o) --- util-src/Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'util-src') diff --git a/util-src/Makefile b/util-src/Makefile index 91c60d7f..c71e06b4 100644 --- a/util-src/Makefile +++ b/util-src/Makefile @@ -33,9 +33,5 @@ encodings.so: encodings.o hashes.so: hashes.o $(CC) -o $@ $< $(LDFLAGS) -l$(OPENSSL_LIB) -.c.o: - $(CC) $(CFLAGS) -c -o $@ $< - -.o.so: - $(LD) -o $@ $< $(LDFLAGS) - +%.so: %.o + $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) -- cgit v1.2.3 From 265af7c012f777491530e62ccdf089e6f780c7db Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 27 Sep 2015 00:10:18 +0200 Subject: util-src/Makefile: Don't make exceptions for how to build .so for util.hashes and util.encodings --- util-src/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'util-src') diff --git a/util-src/Makefile b/util-src/Makefile index c71e06b4..f35c20bc 100644 --- a/util-src/Makefile +++ b/util-src/Makefile @@ -27,11 +27,9 @@ install: $(ALL) clean: rm -f $(ALL) -encodings.so: encodings.o - $(CC) -o $@ $< $(LDFLAGS) $(IDNA_LIBS) +encodings.so: LDLIBS+=$(IDNA_LIBS) -hashes.so: hashes.o - $(CC) -o $@ $< $(LDFLAGS) -l$(OPENSSL_LIB) +hashes.so: LDLIBS+=-l$(OPENSSL_LIB) %.so: %.o $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) -- cgit v1.2.3 From 945a98ba5bc025c4140035c94327e4c0dc64576e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 27 Sep 2015 00:12:07 +0200 Subject: util-src/Makefile: Remove redundant variables (set in config.unix already) --- util-src/Makefile | 8 -------- 1 file changed, 8 deletions(-) (limited to 'util-src') diff --git a/util-src/Makefile b/util-src/Makefile index f35c20bc..5af97f35 100644 --- a/util-src/Makefile +++ b/util-src/Makefile @@ -1,14 +1,6 @@ include ../config.unix -LUA_SUFFIX?=5.1 -LUA_INCDIR?=/usr/include/lua$(LUA_SUFFIX) -LUA_LIB?=lua$(LUA_SUFFIX) -IDN_LIB?=idn -OPENSSL_LIB?=crypto -CC?=gcc -CXX?=g++ -LD?=gcc CFLAGS+=-ggdb -I$(LUA_INCDIR) INSTALL_DATA=install -m644 -- cgit v1.2.3 From 9a4c2f7e52b68d56c4c883234cc704ef1b045b33 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 27 Sep 2015 00:28:46 +0200 Subject: configure,util-src/Makefile: Make a variable that includes -l for OpenSSL (like with IDNA_LIBS) --- util-src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util-src') diff --git a/util-src/Makefile b/util-src/Makefile index 5af97f35..5f35b81b 100644 --- a/util-src/Makefile +++ b/util-src/Makefile @@ -21,7 +21,7 @@ clean: encodings.so: LDLIBS+=$(IDNA_LIBS) -hashes.so: LDLIBS+=-l$(OPENSSL_LIB) +hashes.so: LDLIBS+=$(OPENSSL_LIBS) %.so: %.o $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS) -- cgit v1.2.3