]> git.tuebingen.mpg.de Git - osl.git/commitdiff
Makefile: Disallow undefined symbols.
authorAndre Noll <maan@systemlinux.org>
Sat, 31 May 2008 15:12:18 +0000 (17:12 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 31 May 2008 15:12:18 +0000 (17:12 +0200)
Makefile

index 4e8b48e8aedfc673f7c97a2566b0909272c5dad8..38af988b70655f2c48c866c7d36d013b5fa436af 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,9 @@ ifeq ($(uname_s),NetBSD)
 endif
 all: $(dso_filename)
 
 endif
 all: $(dso_filename)
 
+# disallow undefined symbols
+LDFLAGS += -Wl,-z,defs
+
 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
 DEBUG_CPPFLAGS += -Wredundant-decls
 #CPPFLAGS += -Os
 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
 DEBUG_CPPFLAGS += -Wredundant-decls
 #CPPFLAGS += -Os
@@ -55,7 +58,7 @@ Makefile.deps: $(wildcard *.c *.h)
 %.o: %.c Makefile
        $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
 $(dso_filename): $(objects)
 %.o: %.c Makefile
        $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
 $(dso_filename): $(objects)
-       $(CC) $(dso_opts) -o $@ $(objects) -lcrypto
+       $(CC) $(dso_opts) -o $@ $(objects) $(LDFLAGS) -lcrypto
 
 osl_errors.h: errlist
        sed -e 's/\([A-Z_]*\)   .*/     E_OSL_\1/' \
 
 osl_errors.h: errlist
        sed -e 's/\([A-Z_]*\)   .*/     E_OSL_\1/' \