webmcp

changeset 541:72e55c2eb63c

Use "cc -shared" instead of "ld -shared" to create *.so files
author jbe
date Sat Oct 19 15:05:55 2019 +0200 (2019-10-19)
parents d0104bb90ede
children 99a0f1165ef8
files Makefile.options framework/accelerator/Makefile libraries/extos/Makefile libraries/json/Makefile libraries/mondelefant/Makefile libraries/moonhash/Makefile libraries/multirand/Makefile
line diff
     1.1 --- a/Makefile.options	Sat Oct 12 20:35:00 2019 +0200
     1.2 +++ b/Makefile.options	Sat Oct 19 15:05:55 2019 +0200
     1.3 @@ -1,9 +1,6 @@
     1.4  # C compiler command
     1.5  CC = cc
     1.6  
     1.7 -# linker command
     1.8 -LD = ld
     1.9 -
    1.10  # filename extension for shared libraries
    1.11  SLIB_EXT = so
    1.12  
    1.13 @@ -19,9 +16,9 @@
    1.14  # additional C compiler flags for parts which depend on PostgreSQL
    1.15  CFLAGS_PGSQL = -I `pg_config --includedir` -I `pg_config --pkgincludedir` -I `pg_config --includedir-server`
    1.16  
    1.17 -# linker flags
    1.18 -LDFLAGS = -shared -L /usr/lib -L /usr/local/lib -lc
    1.19 +# alternative C compiler flags for creating shared libraries
    1.20 +SHAREDFLAGS = -shared -L /usr/lib -L /usr/local/lib -lc
    1.21  # NOTE: -lc needed on FreeBSD to avoid weird problems
    1.22  
    1.23 -# additional linker flags for parts which depend on PostgreSQL
    1.24 -LDFLAGS_PGSQL = -L `pg_config --libdir` -rpath `pg_config --libdir`
    1.25 +# additional C compiler flags for creating shared libraries for parts which depend on PostgreSQL
    1.26 +SHAREDFLAGS_PGSQL = -L `pg_config --libdir` -Wl,--rpath,`pg_config --libdir`
     2.1 --- a/framework/accelerator/Makefile	Sat Oct 12 20:35:00 2019 +0200
     2.2 +++ b/framework/accelerator/Makefile	Sat Oct 19 15:05:55 2019 +0200
     2.3 @@ -1,7 +1,7 @@
     2.4  include ../../Makefile.options
     2.5  
     2.6  webmcp_accelerator.so: webmcp_accelerator.o
     2.7 -	$(LD) $(LDFLAGS) -o webmcp_accelerator.$(SLIB_EXT) webmcp_accelerator.o
     2.8 +	$(CC) $(SHAREDFLAGS) -o webmcp_accelerator.$(SLIB_EXT) webmcp_accelerator.o
     2.9  
    2.10  webmcp_accelerator.o: webmcp_accelerator.c
    2.11  	$(CC) -c $(CFLAGS) -o webmcp_accelerator.o webmcp_accelerator.c
     3.1 --- a/libraries/extos/Makefile	Sat Oct 12 20:35:00 2019 +0200
     3.2 +++ b/libraries/extos/Makefile	Sat Oct 19 15:05:55 2019 +0200
     3.3 @@ -1,7 +1,7 @@
     3.4  include ../../Makefile.options
     3.5  
     3.6  extos.so: extos.o
     3.7 -	$(LD) $(LDFLAGS) -lrt -lcrypt -o extos.$(SLIB_EXT) extos.o 
     3.8 +	$(CC) $(SHAREDFLAGS) -lrt -lcrypt -o extos.$(SLIB_EXT) extos.o 
     3.9  
    3.10  extos.o: extos.c
    3.11  	$(CC) -c $(CFLAGS) -o extos.o extos.c
     4.1 --- a/libraries/json/Makefile	Sat Oct 12 20:35:00 2019 +0200
     4.2 +++ b/libraries/json/Makefile	Sat Oct 19 15:05:55 2019 +0200
     4.3 @@ -1,7 +1,7 @@
     4.4  include ../../Makefile.options
     4.5  
     4.6  json.so: json.o
     4.7 -	$(LD) $(LDFLAGS) -o json.$(SLIB_EXT) json.o
     4.8 +	$(CC) $(SHAREDFLAGS) -o json.$(SLIB_EXT) json.o
     4.9  
    4.10  json.o: json.c
    4.11  	$(CC) -c $(CFLAGS) -o json.o json.c
     5.1 --- a/libraries/mondelefant/Makefile	Sat Oct 12 20:35:00 2019 +0200
     5.2 +++ b/libraries/mondelefant/Makefile	Sat Oct 19 15:05:55 2019 +0200
     5.3 @@ -1,7 +1,7 @@
     5.4  include ../../Makefile.options
     5.5  
     5.6  mondelefant_native.so: mondelefant_native.o
     5.7 -	$(LD) $(LDFLAGS) $(LDFLAGS_PGSQL) -o mondelefant_native.$(SLIB_EXT) mondelefant_native.o -lpq
     5.8 +	$(CC) $(SHAREDFLAGS) $(SHAREDFLAGS_PGSQL) -o mondelefant_native.$(SLIB_EXT) mondelefant_native.o -lpq
     5.9  
    5.10  mondelefant_native.o: mondelefant_native.c
    5.11  	$(CC) -c $(CFLAGS) $(CFLAGS_PGSQL) -o mondelefant_native.o mondelefant_native.c
     6.1 --- a/libraries/moonhash/Makefile	Sat Oct 12 20:35:00 2019 +0200
     6.2 +++ b/libraries/moonhash/Makefile	Sat Oct 19 15:05:55 2019 +0200
     6.3 @@ -1,7 +1,7 @@
     6.4  include ../../Makefile.options
     6.5  
     6.6  moonhash.so: moonhash.o
     6.7 -	$(LD) $(LDFLAGS) -o moonhash.so moonhash.o
     6.8 +	$(CC) $(SHAREDFLAGS) -o moonhash.so moonhash.o
     6.9  
    6.10  moonhash.o: moonhash.c moonhash_sha3.c
    6.11  	$(CC) -c $(CFLAGS) -o moonhash.o moonhash.c
     7.1 --- a/libraries/multirand/Makefile	Sat Oct 12 20:35:00 2019 +0200
     7.2 +++ b/libraries/multirand/Makefile	Sat Oct 19 15:05:55 2019 +0200
     7.3 @@ -1,7 +1,7 @@
     7.4  include ../../Makefile.options
     7.5  
     7.6  multirand.so: multirand.o
     7.7 -	$(LD) $(LDFLAGS) -o multirand.$(SLIB_EXT) multirand.o
     7.8 +	$(CC) $(SHAREDFLAGS) -o multirand.$(SLIB_EXT) multirand.o
     7.9  
    7.10  multirand.o: multirand.c
    7.11  	$(CC) -c $(CFLAGS) -o multirand.o multirand.c

Impressum / About Us