SOURCES: dhcp-libdhcp4client.make - use PIC objects to create .so
qboosh
qboosh at pld-linux.org
Tue Dec 25 13:16:35 CET 2007
Author: qboosh Date: Tue Dec 25 12:16:35 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use PIC objects to create .so
---- Files affected:
SOURCES:
dhcp-libdhcp4client.make (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/dhcp-libdhcp4client.make
diff -u SOURCES/dhcp-libdhcp4client.make:1.1 SOURCES/dhcp-libdhcp4client.make:1.2
--- SOURCES/dhcp-libdhcp4client.make:1.1 Fri Dec 14 00:12:16 2007
+++ SOURCES/dhcp-libdhcp4client.make Tue Dec 25 13:16:30 2007
@@ -72,6 +72,7 @@
HDRS = dhcp4client.h
SRCS = $(COMMON_SRCS) $(CLIENT_SRCS)
OBJS = $(SRCS:.c=.o)
+LOBJS = $(SRCS:.c=.lo)
INCLUDES = -I$(TOP) -I$(TOP)/includes -I$(TOP)/dst -I.
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) \
@@ -92,7 +93,7 @@
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
clean:
- -rm -f $(OBJS)
+ -rm -f $(OBJS) $(LOBJS)
realclean: clean
-rm -f $(PROG) *~ #*
@@ -137,6 +138,9 @@
ln ../minires/libres.a .; \
$(AR) x libres.a
+%.lo: %.c
+ $(CC) -o $@ $(CFLAGS) -fPIC -c $<
+
# Create the libraries
# minires/res_query.o contains an undefined symbol __h_errno_set, is not
# used by any dhcp code, and is optimized out by the linker when producing
@@ -144,7 +148,7 @@
libdhcp4client.a: $(OBJS) libres.a
$(AR) crus $@ $(OBJS) `$(AR) t libres.a | grep -v res_query.o`
-libdhcp4client-$(VER).so.0: $(OBJS) libres.a
- $(CC) -shared -o $@ -Wl,-soname,$@ $(OBJS) `$(AR) t libres.a | grep -v res_query.o`
+libdhcp4client-$(VER).so.0: $(LOBJS) libres.a
+ $(CC) $(LDFLAGS) $(CFLAGS) -shared -o $@ -Wl,-soname,$@ $(LOBJS) `$(AR) t libres.a | grep -v res_query.o`
# Dependencies (semi-automatically-generated)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/dhcp-libdhcp4client.make?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list