openbsd-ports/x11/libdnd/patches/patch-DNDlib_Makefile_in
wilfried ceaddf3c0d Import of libdnd-1.1
This library allows to use drag and drop protocol with any X program, ok naddy@
2001-03-07 15:43:32 +00:00

75 lines
2.0 KiB
Plaintext

$OpenBSD: patch-DNDlib_Makefile_in,v 1.1.1.1 2001/03/07 15:43:33 wilfried Exp $
--- DNDlib/Makefile.in.orig Fri May 23 04:18:22 1997
+++ DNDlib/Makefile.in Fri Feb 9 21:04:27 2001
@@ -13,30 +13,41 @@ LDFLAGS = @LDFLAGS@
RANLIB = @RANLIB@
LIBS = @LIBS@ @X_LIBS@ @X_PRE_LIBS@ -lXmu -lXaw -lXt -lX11 @X_EXTRA_LIBS@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-LIB_DIR = @libdir@
-INC_DIR = @includedir@/OffiX
+LIBS+= -Wl,-rpath,$(X11BASE)/lib
+SHLDFLAGS= -shared -fPIC
+DNDLIB= libDnd.so.0.0
+DNDPLUSLIB= libDnd++.so.0.0
+
+#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