72 lines
2.7 KiB
Text
72 lines
2.7 KiB
Text
$NetBSD: patch-aa,v 1.3 2011/04/09 08:58:51 obache Exp $
|
|
|
|
--- src/Makefile.orig 2003-05-15 16:17:53.000000000 +0200
|
|
+++ src/Makefile
|
|
@@ -38,7 +38,7 @@ CFLAGS = -g $(GTKCFLAGS)
|
|
MLLINK += -cclib -lcamlrund
|
|
MLFLAGS = -g
|
|
else
|
|
-CFLAGS = -O -DGTK_NO_CHECK_CASTS -DGTK_DISABLE_COMPAT_H $(GTKCFLAGS)
|
|
+CFLAGS = -O -fPIC -DGTK_NO_CHECK_CASTS -DGTK_DISABLE_COMPAT_H $(GTKCFLAGS)
|
|
endif
|
|
|
|
THFLAGS = -thread
|
|
@@ -137,32 +137,39 @@ testcc: lablgladecc lablgtktop
|
|
rm -f testcc.ml
|
|
|
|
install:
|
|
- if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi
|
|
- cp $(ALLOBJS:.cmo=.cmi) $(THOBJS:.cmo=.cmi) $(INSTALLDIR)
|
|
- cp -p *.mli $(INSTALLDIR)
|
|
- cp -p $(ALLOBJS:.cmo=.ml) $(ALLTHOBJS:.cmo=.ml) $(INSTALLDIR)
|
|
- cp $(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) $(INSTALLDIR)
|
|
- cp $(CLIBS) $(INSTALLDIR)
|
|
- cd $(INSTALLDIR) && $(RANLIB) $(CLIBS)
|
|
- cp lablgtktop varcc $(INSTALLDIR)
|
|
- if test -f lablgtktop_t; then cp lablgtktop_t $(INSTALLDIR); fi
|
|
- cp -p *.h $(INSTALLDIR)
|
|
+ if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${INSTALLDIR}; fi
|
|
+ for F in $(ALLOBJS:.cmo=.cmi) $(THOBJS:.cmo=.cmi) *.mli \
|
|
+ $(ALLOBJS:.cmo=.ml) $(ALLTHOBJS:.cmo=.ml) \
|
|
+ $(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) $(CLIBS) *.h; \
|
|
+ do \
|
|
+ ${BSD_INSTALL_DATA} $$F ${DESTDIR}${INSTALLDIR}; \
|
|
+ done
|
|
+ ${BSD_INSTALL_SCRIPT} lablgtktop ${DESTDIR}$(INSTALLDIR)
|
|
+ ${BSD_INSTALL_SCRIPT} varcc ${DESTDIR}$(INSTALLDIR)
|
|
+ if test -f lablgtktop_t; then ${BSD_INSTALL_SCRIPT} lablgtktop_t ${DESTDIR}$(INSTALLDIR); fi
|
|
if test -f lablgtk.cmxa; then $(MAKE) installopt; fi
|
|
+ ${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(DLLDIR)
|
|
if test -f dlllablgtk.so; then \
|
|
- if test -d $(DLLDIR); then : ; else mkdir -p $(DLLDIR); fi; \
|
|
- cp $(CLIBS:lib%.a=dll%.so) $(DLLDIR) || \
|
|
- echo "Couldn't install dlls in default location"; \
|
|
+ for F in $(CLIBS:lib%.a=dll%.so); \
|
|
+ do \
|
|
+ ${BSD_INSTALL_DATA} $$F ${DESTDIR}$(DLLDIR); \
|
|
+ done; \
|
|
fi
|
|
- cp lablgtk $(BINDIR)
|
|
+ ${BSD_INSTALL_SCRIPT} lablgtk ${DESTDIR}$(BINDIR)
|
|
if test -f lablgladecc; then cp lablgladecc $(BINDIR); fi
|
|
|
|
installopt:
|
|
- cp $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) $(INSTALLDIR)
|
|
- cd $(INSTALLDIR) && $(RANLIB) $(MLLIBS:.cma=.a)
|
|
- cp $(ALLOBJS:.cmo=.cmx) $(INSTALLDIR)
|
|
- cp $(INITOBJS:.cmo=.o) $(INSTALLDIR)
|
|
+ for F in $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) \
|
|
+ $(ALLOBJS:.cmo=.cmx) $(INITOBJS:.cmo=.o); \
|
|
+ do \
|
|
+ ${BSD_INSTALL_DATA} $$F ${DESTDIR}$(INSTALLDIR); \
|
|
+ done
|
|
if test -f gtkThread.cmx; then \
|
|
- cp $(THOBJS:.cmo=.cmx) $(THOBJS:.cmo=.o) $(INSTALLDIR); fi
|
|
+ for F in $(THOBJS:.cmo=.cmx) $(THOBJS:.cmo=.o); \
|
|
+ do \
|
|
+ ${BSD_INSTALL_DATA} $$F ${DESTDIR}$(INSTALLDIR); \
|
|
+ done; \
|
|
+ fi
|
|
|
|
liblablgtk.a: $(COBJS)
|
|
$(LIBRARIAN) -o lablgtk $(COBJS) $(GTKLIBS)
|