summaryrefslogtreecommitdiff
path: root/x11/efltk/patches/patch-ad
blob: 9f595bf757dd2f18b7b29da7091080eb32632cb1 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
$NetBSD: patch-ad,v 1.1 2006/02/18 14:07:54 joerg Exp $

--- src/makeinclude_tmpl.orig	2006-02-01 17:48:42.000000000 +0000
+++ src/makeinclude_tmpl
@@ -50,6 +50,14 @@ LIBRARY = $(EFLTK_TOPDIR)/lib/$(LIBNAME)
 DSO = $(EFLTK_TOPDIR)/lib/$(LIBNAME)
 DSONAME = $(LIBNAME)$(DSOEXT)
 
+libtool: ${LIBRARY}.la
+ifneq ($(DIRS), )
+	@for dir in $(DIRS); do\
+        	if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\
+        	(cd $$dir;$(MAKE) $(MFLAGS) libtool) || exit;\
+	done
+endif
+
 static: $(LIBRARY)$(LIBEXT)
 ifneq ($(DIRS), )
 	@for dir in $(DIRS); do\
@@ -72,6 +80,10 @@ $(LIBRARY).a: $(STATIC_OBJECTS)
 	@$(LIBCOMMAND) $@ $(STATIC_OBJECTS)
 	@$(RANLIB) $@
 
+$(LIBRARY).la: $(OBJECTS:.o=.lo)
+	${LIBTOOL} --mode=link ${CXX} -o $@ ${CXXFLAGS} ${LDFLAGS} \
+	    -rpath ${libdir} -version-info 2:0 ${OBJECTS:.o=.lo} ${DSOLIBS}
+
 $(DSO).so.$(FL_API_VERSION) $(DSO).sl.$(FL_API_VERSION): $(SHARED_OBJECTS)
 	@rm -f $@
 	@echo $(DSOCOMMAND) $(DSONAME) ...
@@ -112,6 +124,16 @@ ifneq ($(DIRS), )
 	done
 endif
 
+install_libtool: libtool
+	${BSD_INSTALL_DATA_DIR} ${libdir}
+	${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${LIBRARY}.la ${libdir}
+ifneq ($(DIRS), )
+	@for dir in $(DIRS); do\
+        	if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\
+        	(cd $$dir;$(MAKE) $(MFLAGS) install_libtool) || exit;\
+	done
+endif
+
 install_shared: shared
 	@echo "Installing shared libraries..."
 	@mkdir -p $(libdir)
@@ -140,6 +162,14 @@ ifneq ($(DIRS), )
 	done
 endif
 
+libtool: ${OBJECTS:.o=.lo}
+ifneq ($(DIRS), )
+	@for dir in $(DIRS); do\
+        	if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\
+        	(cd $$dir;$(MAKE) $(MFLAGS) libtool) || exit;\
+	done
+endif
+
 shared: $(SHARED_OBJECTS)
 ifneq ($(DIRS), )
 	@for dir in $(DIRS); do\
@@ -156,6 +186,14 @@ ifneq ($(DIRS), )
 	done
 endif
 
+install_libtool: libtool
+ifneq ($(DIRS), )
+	@for dir in $(DIRS); do\
+        	if test ! -f $$dir/makedepend; then touch $$dir/makedepend; fi;\
+        	(cd $$dir;$(MAKE) $(MFLAGS) install_libtool) || exit;\
+	done
+endif
+
 install_shared: shared
 ifneq ($(DIRS), )
 	@for dir in $(DIRS); do\
@@ -204,12 +242,7 @@ install_programs: $(PROGRAM)
 ifneq ($(PROGRAM), )
 	@echo Installing $(PROGRAM)..
 	@mkdir -p $(bindir)
-	@if [ ! "$(OSTYPE)" = "cygwin32" ]; then \
-		cp $(EFLTK_BINDIR)/$(PROGRAM) $(bindir)/; \
-		chmod 755 $(bindir)/$(PROGRAM); \
-	else \
-		cp $(EFLTK_BINDIR)/$(PROGRAM).exe $(bindir)/; \
-	fi
+	${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} ${EFLTK_BINDIR}/${PROGRAM} ${bindir}
 endif
 ifneq ($(DIRS), )
 	@for dir in $(DIRS); do\
@@ -222,11 +255,7 @@ ifneq ($(PROGRAM), )
 
 $(PROGRAM): $(OBJECTS)
 	@echo Linking $(PROGRAM)...
-	$(CXX) -o $(EFLTK_BINDIR)/$(PROGRAM) $(OBJECTS) $(PROGRAM_LIBS) $(LDLIBS)
-ifneq ($(STRIP), ) 
-	@$(STRIP) $(EFLTK_BINDIR)/$(PROGRAM)$(EXEEXT)
-endif
-
+	${LIBTOOL} $(CXX) -o $(EFLTK_BINDIR)/$(PROGRAM) $(OBJECTS) $(PROGRAM_LIBS) $(LDLIBS)
 endif
 
 uninstall: