87 lines
2.8 KiB
Plaintext
87 lines
2.8 KiB
Plaintext
--- Makefile.in.orig Mon Feb 5 12:51:41 2001
|
|
+++ Makefile.in Sun Feb 25 05:21:28 2001
|
|
@@ -36,7 +36,7 @@
|
|
LN = @LN@
|
|
CC = @CC@
|
|
ENSUREDIR = $(srcdir)/ensure-dir.sh
|
|
-INSTALL_DATA= $(srcdir)/install-sh
|
|
+INSTALL_DATA= @INSTALL@
|
|
CFLAGS = @CFLAGS@
|
|
CPPFLAGS = @CPPFLAGS@
|
|
OBJECTS = src/libnet_resolve.o\
|
|
@@ -66,17 +66,28 @@
|
|
src/libnet_hex_dump.o\
|
|
src/libnet_if_addr.o\
|
|
src/libnet_port_list.o
|
|
+SHOBJECTS= $(OBJECTS:S/.o/.so/)
|
|
+
|
|
+PICFLAG= -fpic
|
|
+SHLIB= $(LIBNET).so.0.0
|
|
+
|
|
+.SUFFIXES: .o .so
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) -c $< -o $@
|
|
|
|
-all: libnet
|
|
+.c.so:
|
|
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $(PICFLAG) -DPIC -c $< -o $@
|
|
+
|
|
supp: test example
|
|
|
|
libnet: version.h $(OBJECTS)
|
|
$(AR) -cr $(LIB) $(OBJECTS)
|
|
$(RANLIB) $(LIB)
|
|
|
|
+$(SHLIB): version.h $(SHOBJECTS)
|
|
+ $(CC) -shared $(PICFLAG) -o $(SHLIB) $(SHOBJECTS)
|
|
+
|
|
version.o: version.h
|
|
version.h: ./VERSION
|
|
@rm -f $@
|
|
@@ -91,25 +102,34 @@
|
|
example: libnet install
|
|
cd example; make
|
|
|
|
+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes"
|
|
+all: libnet
|
|
install: libnet
|
|
+.else
|
|
+all: libnet $(SHLIB)
|
|
+install: libnet $(SHLIB)
|
|
+.endif
|
|
$(ENSUREDIR) $(DESTDIR)$(prefix) 755
|
|
$(ENSUREDIR) $(DESTDIR)$(LIB_PREFIX) 755
|
|
$(ENSUREDIR) $(DESTDIR)$(INC_PREFIX)$(LIBNET) 755
|
|
$(ENSUREDIR) $(DESTDIR)$(INC_PREFIX) 755
|
|
$(ENSUREDIR) $(DESTDIR)$(MAN_PREFIX) 755
|
|
$(ENSUREDIR) $(DESTDIR)$(BIN_PREFIX) 755
|
|
- $(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIB_PREFIX)
|
|
+ $(INSTALL_DATA) -m 0644 $(LIB) $(DESTDIR)$(LIB_PREFIX)
|
|
rm -f $(DESTDIR)$(LIB_PREFIX)$(LIBPWRITE).a
|
|
cd $(DESTDIR)$(LIB_PREFIX); $(LN) -f -s $(LIBNET).a $(LIBPWRITE).a
|
|
- $(INSTALL_DATA) $(INCLUDE) $(DESTDIR)$(INC_PREFIX)
|
|
- $(INSTALL_DATA) $(INCLUDE-H) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
- $(INSTALL_DATA) $(INCLUDE-F) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
- $(INSTALL_DATA) $(INCLUDE-S) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
- $(INSTALL_DATA) $(INCLUDE-M) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
- $(INSTALL_DATA) $(INCLUDE-A) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
- $(INSTALL_DATA) $(INCLUDE-O) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
- $(INSTALL_DATA) $(MAN) $(DESTDIR)$(MAN_PREFIX)
|
|
- $(INSTALL_DATA) $(CONFIG) $(DESTDIR)$(BIN_PREFIX)
|
|
+ @if [ -f $(SHLIB) ]; then \
|
|
+ $(INSTALL_DATA) -m 0644 $(SHLIB) $(DESTDIR)$(LIB_PREFIX) ;\
|
|
+ fi
|
|
+ $(INSTALL_DATA) -m 0644 $(INCLUDE) $(DESTDIR)$(INC_PREFIX)
|
|
+ $(INSTALL_DATA) -m 0644 $(INCLUDE-H) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
+ $(INSTALL_DATA) -m 0644 $(INCLUDE-F) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
+ $(INSTALL_DATA) -m 0644 $(INCLUDE-S) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
+ $(INSTALL_DATA) -m 0644 $(INCLUDE-M) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
+ $(INSTALL_DATA) -m 0644 $(INCLUDE-A) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
+ $(INSTALL_DATA) -m 0644 $(INCLUDE-O) $(DESTDIR)$(INC_PREFIX)$(LIBNET)
|
|
+ $(INSTALL_DATA) -m 0644 $(MAN) $(DESTDIR)$(MAN_PREFIX)
|
|
+ $(INSTALL_DATA) -m 0755 $(CONFIG) $(DESTDIR)$(BIN_PREFIX)
|
|
|
|
|
|
|