]> ruderich.org/simon Gitweb - nsscash/nsscash.git/commitdiff
nss: Makefile: inline library flags
authorSimon Ruderich <simon@ruderich.org>
Sat, 8 Jun 2019 11:06:04 +0000 (13:06 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sat, 8 Jun 2019 11:06:04 +0000 (13:06 +0200)
We want to build programs in the future which will conflict with -shared
-fPIC.

nss/Makefile

index 4afd529e544eb147c78c9d67d00b9dc3127a6571..195cdc1614e6f8aa9b11103b89e9bca8163b25c2 100644 (file)
@@ -1,7 +1,6 @@
 # Compiler flags
 LDLIBS  = -pthread
-CFLAGS  = -fPIC -Wall -Wextra -Wconversion
-LDFLAGS = -shared
+CFLAGS  = -Wall -Wextra -Wconversion
 # DEB_BUILD_MAINT_OPTIONS='hardening=+all qa=+bug' dpkg-buildflags --export=make
 CFLAGS   += -g -O2 -Werror=array-bounds -Werror=clobbered -Werror=volatile-register-var -Werror=implicit-function-declaration -fstack-protector-strong -Wformat -Werror=format-security
 CPPFLAGS += -Wdate-time -D_FORTIFY_SOURCE=2
@@ -17,7 +16,8 @@ clean:
        rm -f libnss_cash.so.2
 
 libnss_cash.so.2: $(wildcard *.c) $(wildcard *.h)
-       $(CC) -o $@ -Wl,-soname,$@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \
+       $(CC) -o $@ -shared -fPIC -Wl,-soname,$@ \
+               $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \
                file.c pw.c search.c \
                $(LDLIBS)