freebsd-ports/x11-toolkits/fl_editor/files/patch-Makefile.in
Christian Weisgerber f7d7822118 Miscellaneous clean-up, drop maintainership.
PR:		64031
Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net>
2004-03-12 20:48:04 +00:00

86 lines
2.2 KiB
Text

--- Makefile.in.orig Fri Jun 14 23:12:25 2002
+++ Makefile.in Wed Mar 10 02:08:47 2004
@@ -23,7 +23,10 @@
DSONAME = @DSOLIBNAME@@DSOEXT@
GLLIB = @GLLIB@
FLTKROOT = @ac_fltk_root@
-FLTKLIBDIR = @ac_fltk_libraries@
+FLTKLIBDIR = %%PREFIX%%/lib
+FLTKINCDIR = %%PREFIX%%/include/FL
+MKDIR = mkdir -p
+INSTALL_DATA = ${BSD_INSTALL_DATA}
#
# Program options...
@@ -40,14 +43,19 @@
#
.SILENT:
-.SUFFIXES: .c .cxx .h .o
+.SUFFIXES: .c .cxx .h .o .lo
.c.o:
echo Compiling $<...
$(CC) $(CFLAGS) -c $< -o $(<D)/$(basename $(<F)).o
.cxx.o:
echo Compiling $<...
- echo $(CXX) $(CXXFLAGS) -c $< -o $(<D)/$(basename $(<F)).o
$(CXX) $(CXXFLAGS) -c $< -o $(<D)/$(basename $(<F)).o
+.c.lo:
+ echo Compiling $<...
+ $(CC) $(CFLAGS) -fPIC -c $< -o $(<D)/$(basename $(<F)).lo
+.cxx.lo:
+ echo Compiling $<...
+ $(CXX) $(CXXFLAGS) -fPIC -c $< -o $(<D)/$(basename $(<F)).lo
#
@@ -62,7 +70,7 @@
# Make all targets...
#
-all: libfleditor.a $(DSONAME) test
+all: libfleditor.a $(DSONAME)
#
# Remove object and target files...
@@ -86,7 +94,11 @@
install: libfleditor.a
echo "Installing library to $(FLTKLIBDIR)"
- cp libfleditor.a $(FLTKLIBDIR)
+ ${RM} -f $(FLTKLIBDIR)/libfleditor.*
+ ${INSTALL_DATA} libfleditor.a $(DSONAME) $(FLTKLIBDIR)
+ echo "Installing headers to $(FLTKINCDIR)"
+ ${MKDIR} -p $(FLTKINCDIR)
+ ${INSTALL_DATA} FL/*.[Hh] $(FLTKINCDIR)
#
# Make the test programs.
@@ -122,6 +134,7 @@
EDITOR_OBJS = src/Fl_Editor.o src/Fl_FancyEditor.o src/Fl_FancyMultiEditor.o \
src/Fl_MultiEditor.o src/Fl_ProgressBox.o src/Fl_StatusPanel.o \
src/editengine.o src/lists.o src/wstring.o
+EDITOR_SHOBJS = $(EDITOR_OBJS:.o=.lo)
libfleditor.a: $(EDITOR_OBJS)
echo Building library $@...
@@ -129,15 +142,14 @@
$(AR) $(ARFLAGS) libfleditor.a $(EDITOR_OBJS)
$(RANLIB) libfleditor.a
-libfleditor.so: $(EDITOR_OBJS)
+$(DSONAME): $(EDITOR_SHOBJS)
echo Building library $@...
- $(RM) libfleditor.so
- @DSOCOMMAND@ @DSOLIBNAME@@DSOEXT@ $(EDITOR_OBJS)
-# echo $(DSOCOMMAND) $(DSONAME)
-# $(LD) -shared $(LDFLAGS) -o $@ $^
+ $(RM) $(DSONAME)
+ @DSOCOMMAND@ $(DSONAME) $(EDITOR_SHOBJS)
$(EDITOR_OBJS): $(INCLUDEDEPS)
+$(EDITOR_SHOBJS): $(INCLUDEDEPS)
#
# End of Makefile.