Commit c62d48ed authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#9525 - Rework contrib module builds

Adjust to honor CFLAGS and LDFLAGS
Drop -Wall from the OPTimization flag
parent 8f392914
Pipeline #2557 passed with stage
in 60 minutes and 2 seconds
...@@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
#DEFS = -DSLAPD_PBKDF2_DEBUG #DEFS = -DSLAPD_PBKDF2_DEBUG
SSL_INC = SSL_INC =
...@@ -35,12 +35,12 @@ man5dir = $(mandir)/man5 ...@@ -35,12 +35,12 @@ man5dir = $(mandir)/man5
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
pw-pbkdf2.la: pw-pbkdf2.lo pw-pbkdf2.la: pw-pbkdf2.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
...@@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
DEFS = DEFS =
#DEFS = -DSLAPD_SHA2_DEBUG #DEFS = -DSLAPD_SHA2_DEBUG
INCS = $(LDAP_INC) INCS = $(LDAP_INC)
...@@ -32,12 +32,12 @@ man5dir = $(mandir)/man5 ...@@ -32,12 +32,12 @@ man5dir = $(mandir)/man5
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
pw-sha2.la: slapd-sha2.lo sha2.lo pw-sha2.la: slapd-sha2.lo sha2.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
...@@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
DEFS = DEFS =
INCS = $(LDAP_INC) INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB) LIBS = $(LDAP_LIB)
...@@ -31,12 +31,12 @@ man5dir = $(mandir)/man5 ...@@ -31,12 +31,12 @@ man5dir = $(mandir)/man5
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
pw-totp.la: slapd-totp.lo pw-totp.la: slapd-totp.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
...@@ -18,7 +18,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/liblber/liblber.la $(LDAP_BUILD)/libraries/li ...@@ -18,7 +18,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/liblber/liblber.la $(LDAP_BUILD)/libraries/li
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
CC = gcc CC = gcc
OPT = -g -O2 -Wall -fpic OPT = -g -O2 -fpic
# To skip linking against CRACKLIB make CRACK=no # To skip linking against CRACKLIB make CRACK=no
CRACK=yes CRACK=yes
...@@ -61,13 +61,13 @@ TESTS=./unit_tests.sh ...@@ -61,13 +61,13 @@ TESTS=./unit_tests.sh
all: ppm $(TEST) all: ppm $(TEST)
$(TEST): ppm $(TEST): ppm
$(CC) -g $(INCS) $(LDAP_LIBS) -Wl,-rpath=. -o $(TEST) ppm_test.c $(PROGRAMS) $(LDAP_LIBS) $(CRACKLIB) $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(LDFLAGS) $(INCS) $(LDAP_LIBS) -Wl,-rpath=. -o $(TEST) ppm_test.c $(PROGRAMS) $(LDAP_LIBS) $(CRACKLIB)
ppm.o: ppm.o:
$(CC) $(OPT) $(DEFS) -c $(INCS) ppm.c $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) -c $(INCS) ppm.c
ppm: ppm.o ppm: ppm.o
$(CC) $(INCS) -shared -o $(PROGRAMS) ppm.o $(CRACKLIB) $(CC) $(LDFLAGS) $(INCS) -shared -o $(PROGRAMS) ppm.o $(CRACKLIB)
install: ppm install: ppm
mkdir -p $(DESTDIR)$(moduledir) mkdir -p $(DESTDIR)$(moduledir)
......
...@@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
DEFS = DEFS =
INCS = $(LDAP_INC) INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB) LIBS = $(LDAP_LIB)
...@@ -39,12 +39,12 @@ moduledir = $(libexecdir)$(ldap_subdir) ...@@ -39,12 +39,12 @@ moduledir = $(libexecdir)$(ldap_subdir)
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
proxyOld.la: proxyOld.lo proxyOld.la: proxyOld.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
...@@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
DEFS = -DSLAPD_OVER_RBAC=SLAPD_MOD_DYNAMIC DEFS = -DSLAPD_OVER_RBAC=SLAPD_MOD_DYNAMIC
INCS = $(LDAP_INC) INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB) LIBS = $(LDAP_LIB)
...@@ -36,12 +36,12 @@ LOBJS = $(patsubst %.c,%.lo,$(SRCS)) ...@@ -36,12 +36,12 @@ LOBJS = $(patsubst %.c,%.lo,$(SRCS))
.SUFFIXES: .c .lo .SUFFIXES: .c .lo
%.lo: %.c rbac.h %.lo: %.c rbac.h
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
rbac.la: $(LOBJS) rbac.la: $(LOBJS)
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $^ $(LIBS) -rpath $(moduledir) -module -o $@ $^ $(LIBS)
clean: clean:
......
...@@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
DEFS = -DSLAPD_OVER_RDNVAL=SLAPD_MOD_DYNAMIC \ DEFS = -DSLAPD_OVER_RDNVAL=SLAPD_MOD_DYNAMIC \
-DSLAPD_OVER_PGUID=SLAPD_MOD_DYNAMIC \ -DSLAPD_OVER_PGUID=SLAPD_MOD_DYNAMIC \
-DSLAPD_OVER_VERNUM=SLAPD_MOD_DYNAMIC -DSLAPD_OVER_VERNUM=SLAPD_MOD_DYNAMIC
...@@ -41,20 +41,20 @@ moduledir = $(libexecdir)$(ldap_subdir) ...@@ -41,20 +41,20 @@ moduledir = $(libexecdir)$(ldap_subdir)
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
pguid.la: pguid.lo pguid.la: pguid.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
rdnval.la: rdnval.lo rdnval.la: rdnval.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
vernum.la: vernum.lo vernum.la: vernum.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
...@@ -27,7 +27,7 @@ HEIMDAL_LIB = -L/usr/heimdal/lib -lkrb5 -lkadm5srv ...@@ -27,7 +27,7 @@ HEIMDAL_LIB = -L/usr/heimdal/lib -lkrb5 -lkadm5srv
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
# Omit DO_KRB5, DO_SAMBA or DO_SHADOW if you don't want to support it. # Omit DO_KRB5, DO_SAMBA or DO_SHADOW if you don't want to support it.
DEFS = -DDO_KRB5 -DDO_SAMBA -DDO_SHADOW DEFS = -DDO_KRB5 -DDO_SAMBA -DDO_SHADOW
INCS = $(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC) INCS = $(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC)
...@@ -50,12 +50,12 @@ man5dir = $(mandir)/man5 ...@@ -50,12 +50,12 @@ man5dir = $(mandir)/man5
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
smbk5pwd.la: smbk5pwd.lo smbk5pwd.la: smbk5pwd.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
...@@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
DEFS = -DSLAPD_OVER_TRACE=SLAPD_MOD_DYNAMIC DEFS = -DSLAPD_OVER_TRACE=SLAPD_MOD_DYNAMIC
INCS = $(LDAP_INC) INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB) LIBS = $(LDAP_LIB)
...@@ -27,12 +27,12 @@ moduledir = $(libexecdir)$(ldap_subdir) ...@@ -27,12 +27,12 @@ moduledir = $(libexecdir)$(ldap_subdir)
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
trace.la: trace.lo trace.la: trace.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
...@@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
DEFS = -DSLAPD_OVER_USN=SLAPD_MOD_DYNAMIC DEFS = -DSLAPD_OVER_USN=SLAPD_MOD_DYNAMIC
INCS = $(LDAP_INC) INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB) LIBS = $(LDAP_LIB)
...@@ -27,12 +27,12 @@ moduledir = $(libexecdir)$(ldap_subdir) ...@@ -27,12 +27,12 @@ moduledir = $(libexecdir)$(ldap_subdir)
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
usn.la: usn.lo usn.la: usn.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
...@@ -22,7 +22,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -22,7 +22,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
DEFS = -DSLAPD_OVER_VARIANT=SLAPD_MOD_DYNAMIC DEFS = -DSLAPD_OVER_VARIANT=SLAPD_MOD_DYNAMIC
INCS = $(LDAP_INC) INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB) LIBS = $(LDAP_LIB)
...@@ -52,10 +52,10 @@ include $(dir)/Rules.mk ...@@ -52,10 +52,10 @@ include $(dir)/Rules.mk
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
variant.la: variant.lo variant.la: variant.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
...@@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ ...@@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \
LIBTOOL = $(LDAP_BUILD)/libtool LIBTOOL = $(LDAP_BUILD)/libtool
CC = gcc CC = gcc
OPT = -g -O2 -Wall OPT = -g -O2
DEFS = DEFS =
INCS = $(LDAP_INC) INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB) LIBS = $(LDAP_LIB)
...@@ -39,12 +39,12 @@ moduledir = $(libexecdir)$(ldap_subdir) ...@@ -39,12 +39,12 @@ moduledir = $(libexecdir)$(ldap_subdir)
.SUFFIXES: .c .o .lo .SUFFIXES: .c .o .lo
.c.lo: .c.lo:
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $< $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(OPT) $(CPPFLAGS) $(DEFS) $(INCS) -c $<
all: $(PROGRAMS) all: $(PROGRAMS)
vc.la: vc.lo vc.la: vc.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -version-info $(LTVER) \
-rpath $(moduledir) -module -o $@ $? $(LIBS) -rpath $(moduledir) -module -o $@ $? $(LIBS)
clean: clean:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment