74 lines
2.0 KiB
Plaintext
74 lines
2.0 KiB
Plaintext
$OpenBSD: patch-DNDlib_Makefile_in,v 1.2 2005/12/31 17:29:38 naddy Exp $
|
|
--- DNDlib/Makefile.in.orig Fri May 23 04:18:22 1997
|
|
+++ DNDlib/Makefile.in Sat Dec 31 17:36:23 2005
|
|
@@ -13,30 +13,41 @@ LDFLAGS = @LDFLAGS@
|
|
RANLIB = @RANLIB@
|
|
|
|
LIBS = @LIBS@ @X_LIBS@ @X_PRE_LIBS@ -lXmu -lXaw -lXt -lX11 @X_EXTRA_LIBS@
|
|
+LIBS+= -Wl,-rpath,$(X11BASE)/lib
|
|
+SHLDFLAGS= -shared -fPIC
|
|
+DNDLIB= libDnd.so.${LIBDnd_VERSION}
|
|
+DNDPLUSLIB= libDnd++.so.${LIBDnd++_VERSION}
|
|
|
|
-prefix = @prefix@
|
|
-exec_prefix = @exec_prefix@
|
|
-LIB_DIR = @libdir@
|
|
-INC_DIR = @includedir@/OffiX
|
|
+#prefix = @prefix@
|
|
+#exec_prefix = @exec_prefix@
|
|
+#LIB_DIR = @libdir@
|
|
+#INC_DIR = @includedir@/OffiX
|
|
|
|
COMPILE = $(CC) $(INCLUDES) $(CFLAGS) -c
|
|
CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) -c
|
|
LINK = $(CC) $(LDFLAGS) -o $@
|
|
|
|
+SOCOMPILE= $(COMPILE) -fPIC
|
|
+SOCXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) -c -fPIC
|
|
+
|
|
default: all
|
|
|
|
-all: libC libCpp dndtest
|
|
+all: libC libCpp dndtest libC-so libCpp-so
|
|
|
|
install: libCpp libC
|
|
- install -d $(INC_DIR)
|
|
- install DragAndDrop.h DragAndDropTypes.h $(INC_DIR)
|
|
- install -d $(LIB_DIR)
|
|
- install libDnd.a libDnd++.a $(LIB_DIR)
|
|
+ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/include/OffiX
|
|
+ ${BSD_INSTALL_DATA} DragAndDrop.h DragAndDropTypes.h ${PREFIX}/include/OffiX
|
|
+ ${BSD_INSTALL_DATA} libDnd.a libDnd++.a ${PREFIX}/lib
|
|
+ ${BSD_INSTALL_DATA} ${DNDLIB} ${DNDPLUSLIB} ${PREFIX}/lib
|
|
|
|
libC: libDnd.a
|
|
|
|
libCpp: libDnd++.a
|
|
|
|
+libC-so: $(DNDLIB)
|
|
+
|
|
+libCpp-so: $(DNDPLUSLIB)
|
|
+
|
|
dndtest: dndtest.c libDnd.a
|
|
rm -f dndtest
|
|
$(COMPILE) dndtest.c
|
|
@@ -57,6 +68,16 @@ libDnd++.a: DragAndDrop.c
|
|
$(AR) cru libDnd++.a DragAndDrop.o
|
|
$(RANLIB) libDnd++.a
|
|
|
|
-clean:
|
|
- rm -f *.o *.cxx *.a dndtest *~ *bak
|
|
+$(DNDLIB): DragAndDrop.c
|
|
+ rm -f DragAndDrop.so
|
|
+ $(SOCOMPILE) -o DragAndDrop.so DragAndDrop.c
|
|
+ $(CC) $(SHLDFLAGS) -o $(DNDLIB) DragAndDrop.so
|
|
|
|
+$(DNDPLUSLIB): DragAndDrop.c
|
|
+ rm -f DragAndDrop.so DragAndDrop.cxx
|
|
+ ln -s DragAndDrop.c DragAndDrop.cxx
|
|
+ $(SOCXXCOMPILE) -o DragAndDrop.so DragAndDrop.cxx
|
|
+ $(CC) $(SHLDFLAGS) -o $(DNDPLUSLIB) DragAndDrop.so
|
|
+
|
|
+clean:
|
|
+ rm -f *.o *.so *.cxx *.a dndtest *~ *bak
|