openbsd-ports/graphics/gd/patches/patch-Makefile
brad 5740769a24 - remove -L. from LDFLAGS
- use --quiet option with libtool
2000-07-02 03:41:06 +00:00

159 lines
6.1 KiB
Plaintext

--- Makefile.orig Sat Jun 3 15:26:12 2000
+++ Makefile Sat Jul 1 23:25:00 2000
@@ -51,13 +51,13 @@
LIBDIRS=-L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
#Location where libgd.a should be installed by "make install".
-INSTALL_LIB=/usr/local/lib
+INSTALL_LIB=$(prefix)/lib
#Location where .h files should be installed by "make install".
-INSTALL_INCLUDE=/usr/local/include
+INSTALL_INCLUDE=$(prefix)/include
#Location where useful non-test programs should be installed by "make install".
-INSTALL_BIN=/usr/local/bin
+INSTALL_BIN=$(prefix)/bin
#
#
@@ -69,6 +69,7 @@
CC=$(COMPILER) $(INCLUDEDIRS)
LINK=$(CC) $(LIBDIRS) $(LIBS)
+LIBTOOL=libtool --quiet
PROGRAMS=$(BIN_PROGRAMS) $(TEST_PROGRAMS)
@@ -78,68 +79,68 @@
all: libgd.a $(PROGRAMS)
install: libgd.a $(BIN_PROGRAMS)
- sh ./install-item 644 libgd.a $(INSTALL_LIB)/libgd.a
- sh ./install-item 755 pngtogd $(INSTALL_BIN)/pngtogd
- sh ./install-item 755 pngtogd2 $(INSTALL_BIN)/pngtogd2
- sh ./install-item 755 gdtopng $(INSTALL_BIN)/gdtopng
- sh ./install-item 755 gd2topng $(INSTALL_BIN)/gd2topng
- sh ./install-item 755 gd2copypal $(INSTALL_BIN)/gd2copypal
- sh ./install-item 755 gdparttopng $(INSTALL_BIN)/gdparttopng
- sh ./install-item 755 webpng $(INSTALL_BIN)/webpng
- sh ./install-item 755 bdftogd $(INSTALL_BIN)/bdftogd
- sh ./install-item 644 gd.h $(INSTALL_INCLUDE)/gd.h
- sh ./install-item 644 gdcache.h $(INSTALL_INCLUDE)/gdcache.h
- sh ./install-item 644 gd_io.h $(INSTALL_INCLUDE)/gd_io.h
- sh ./install-item 644 gdfontg.h $(INSTALL_INCLUDE)/gdfontg.h
- sh ./install-item 644 gdfontl.h $(INSTALL_INCLUDE)/gdfontl.h
- sh ./install-item 644 gdfontmb.h $(INSTALL_INCLUDE)/gdfontmb.h
- sh ./install-item 644 gdfonts.h $(INSTALL_INCLUDE)/gdfonts.h
- sh ./install-item 644 gdfontt.h $(INSTALL_INCLUDE)/gdfontt.h
-
-gddemo: gddemo.o libgd.a
- $(CC) gddemo.o -o gddemo $(LIBDIRS) $(LIBS)
-
-pngtogd: pngtogd.o libgd.a
- $(CC) pngtogd.o -o pngtogd $(LIBDIRS) $(LIBS)
-
-webpng: webpng.o libgd.a
- $(CC) webpng.o -o webpng $(LIBDIRS) $(LIBS)
-
-pngtogd2: pngtogd2.o libgd.a
- $(CC) pngtogd2.o -o pngtogd2 $(LIBDIRS) $(LIBS)
-
-gdtopng: gdtopng.o libgd.a
- $(CC) gdtopng.o -o gdtopng $(LIBDIRS) $(LIBS)
-
-gd2topng: gd2topng.o libgd.a
- $(CC) gd2topng.o -o gd2topng $(LIBDIRS) $(LIBS)
-
-gd2copypal: gd2copypal.o libgd.a
- $(CC) gd2copypal.o -o gd2copypal $(LIBDIRS) $(LIBS)
-
-gdparttopng: gdparttopng.o libgd.a
- $(CC) gdparttopng.o -o gdparttopng $(LIBDIRS) $(LIBS)
-
-gdtest: gdtest.o libgd.a
- $(CC) gdtest.o -o gdtest $(LIBDIRS) $(LIBS)
-
-gd2time: gd2time.o libgd.a
- $(CC) gd2time.o -o gd2time $(LIBDIRS) $(LIBS)
-
-gdtestttf: gdtestttf.o libgd.a
- $(CC) gdtestttf.o -o gdtestttf $(LIBDIRS) $(LIBS)
-
-libgd.a: gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o gd_io_file.o gd_ss.o \
- gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o \
- gdfontg.o gdtables.o gdttf.o gdcache.o gdkanji.o wbmp.o gd_wbmp.o \
- gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h
- rm -f libgd.a
- $(AR) rc libgd.a gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o \
- gd_io_file.o gd_ss.o gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o \
- gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
- gdtables.o gdttf.o gdcache.o gdkanji.o wbmp.o gd_wbmp.o
- -ranlib libgd.a
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) libgd.la $(DESTDIR)$(INSTALL_LIB)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) pngtogd $(DESTDIR)$(INSTALL_BIN)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) pngtogd2 $(DESTDIR)$(INSTALL_BIN)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) gdtopng $(DESTDIR)$(INSTALL_BIN)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) gd2topng $(DESTDIR)$(INSTALL_BIN)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) gd2copypal $(DESTDIR)$(INSTALL_BIN)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) gdparttopng $(DESTDIR)$(INSTALL_BIN)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) webpng $(DESTDIR)$(INSTALL_BIN)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) bdftogd $(DESTDIR)$(INSTALL_BIN)
+ $(BSD_INSTALL_DATA) gd.h $(DESTDIR)$(INSTALL_INCLUDE)
+ $(BSD_INSTALL_DATA) gdcache.h $(DESTDIR)$(INSTALL_INCLUDE)
+ $(BSD_INSTALL_DATA) gd_io.h $(DESTDIR)$(INSTALL_INCLUDE)
+ $(BSD_INSTALL_DATA) gdfontg.h $(DESTDIR)$(INSTALL_INCLUDE)
+ $(BSD_INSTALL_DATA) gdfontl.h $(DESTDIR)$(INSTALL_INCLUDE)
+ $(BSD_INSTALL_DATA) gdfontmb.h $(DESTDIR)$(INSTALL_INCLUDE)
+ $(BSD_INSTALL_DATA) gdfonts.h $(DESTDIR)$(INSTALL_INCLUDE)
+ $(BSD_INSTALL_DATA) gdfontt.h $(DESTDIR)$(INSTALL_INCLUDE)
+
+gddemo: gddemo.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) gddemo.lo -o gddemo $(LIBDIRS) $(LIBS)
+
+pngtogd: pngtogd.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) pngtogd.lo -o pngtogd $(LIBDIRS) $(LIBS)
+
+webpng: webpng.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) webpng.lo -o webpng $(LIBDIRS) $(LIBS)
+
+pngtogd2: pngtogd2.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) pngtogd2.lo -o pngtogd2 $(LIBDIRS) $(LIBS)
+
+gdtopng: gdtopng.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) gdtopng.lo -o gdtopng $(LIBDIRS) $(LIBS)
+
+gd2topng: gd2topng.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) gd2topng.lo -o gd2topng $(LIBDIRS) $(LIBS)
+
+gd2copypal: gd2copypal.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) gd2copypal.lo -o gd2copypal $(LIBDIRS) $(LIBS)
+
+gdparttopng: gdparttopng.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) gdparttopng.lo -o gdparttopng $(LIBDIRS) $(LIBS)
+
+gdtest: gdtest.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) gdtest.lo -o gdtest $(LIBDIRS) $(LIBS)
+
+gd2time: gd2time.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) gd2time.lo -o gd2time $(LIBDIRS) $(LIBS)
+
+gdtestttf: gdtestttf.lo libgd.a
+ $(LIBTOOL) --mode=link $(CC) gdtestttf.lo -o gdtestttf $(LIBDIRS) $(LIBS)
+
+libgd.a: gd.lo gd_gd.lo gd_gd2.lo gd_io.lo gd_io_dp.lo gd_io_file.lo gd_ss.lo \
+ gd_io_ss.lo gd_png.lo gd_jpeg.lo gdxpm.lo gdfontt.lo gdfonts.lo \
+ gdfontmb.lo gdfontl.lo gdfontg.lo gdtables.lo gdttf.lo gdcache.lo \
+ gdkanji.lo wbmp.lo gd_wbmp.lo
+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libgd.la $(.ALLSRC) \
+ -version-info 18:3:0 -rpath $(INSTALL_LIB)
clean:
- rm -f *.o *.a ${PROGRAMS} test/gdtest.jpg test/gdtest.wbmp
+ rm -f *.o *.lo ${PROGRAMS} libgd.a test/gdtest.jpg test/gdtest.wbmp
+.SUFFIXES: .c .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(.IMPSRC)