summaryrefslogtreecommitdiff
path: root/x11/efltk/patches/patch-ac
blob: 32889e6101c8e89e7b419b6f9e047e35d1d0d23b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
$NetBSD: patch-ac,v 1.2 2006/02/18 14:07:54 joerg Exp $

--- src/Makefile.orig	2005-02-03 15:11:44.000000000 +0000
+++ src/Makefile
@@ -42,7 +42,10 @@ OUT_MAGIC := $(shell mkdir $(EFLTK_TOPDI
 ################################################################
 
 FLDIRS = core widgets db 
-DIRS = xml images opengl net
+DIRS = xml images net
+ifeq ($(HAVE_OPENGL),yes)
+DIRS+= opengl
+endif
 
 LIBNAME = libefltk
 DSOLIBNAME = $(LIBNAME)
@@ -52,6 +55,18 @@ DSONAME = $(LIBNAME)$(DSOEXT)
 
 all: $(BUILDTARGETS)
 
+libtool:
+	@rm -f $(LIBRARY).la
+	@for dir in $(FLDIRS); do\
+        	if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\
+        	(cd $$dir;$(MAKE) $(MFLAGS) libtool) || exit;\
+	done	
+	$(MAKE) $(LIBRARY).la
+	@for dir in $(DIRS); do\
+        	if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\
+        	(cd $$dir;$(MAKE) $(MFLAGS) libtool) || exit;\
+	done	
+
 static:
 	@rm -f $(LIBRARY)$(LIBEXT)
 	@for dir in $(FLDIRS); do\
@@ -80,12 +95,17 @@ programs:
 
 STATIC_OBJECTS = core/*.static.o widgets/*.static.o db/*.static.o
 SHARED_OBJECTS = core/*.shared.o widgets/*.shared.o db/*.shared.o
+LIBTOOL_OBJECTS = core/*.lo widgets/*.lo db/*.lo
 
 $(LIBRARY).a:
 	@echo $(LIBCOMMAND) $@ ...
 	@$(LIBCOMMAND) $@ $(STATIC_OBJECTS)
 	@$(RANLIB) $@
 
+${LIBRARY}.la:
+	${LIBTOOL} --mode=link ${CXX} -o $@ ${CXXFLAGS} ${LDFLAGS} \
+	    -rpath ${libdir} -version-info 2:0 ${LIBTOOL_OBJECTS} ${DSOLIBS}
+
 $(DSO).so.$(FL_API_VERSION) $(DSO).sl.2:
 	@rm -f $@
 	@echo $(DSOCOMMAND) $(DSONAME) ...
@@ -130,6 +150,15 @@ install_static: static
         	(cd $$dir;$(MAKE) $(MFLAGS) install_static) || exit;\
 	done
 
+install_libtool: libtool
+	@echo "Installing libraries..."
+	${BSD_INSTALL_DATA_DIR} $(libdir)
+	${LIBTOOL} --mode=install  ${BSD_INSTALL_LIB} ${LIBRARY}.la ${libdir}
+	@for dir in $(DIRS) $(FLDIRS); do\
+        	if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\
+        	(cd $$dir;$(MAKE) $(MFLAGS) install_libtool) || exit;\
+	done
+
 install_shared: shared
 	@echo "Installing shared libraries..."
 	@rm -f $(libdir)/$(DLLIMPORTNAME)