$NetBSD: patch-ab,v 1.1.1.1 2008/02/24 04:57:07 jlam Exp $ --- x11/Makefile.in.orig 2007-07-08 22:24:24.000000000 -0400 +++ x11/Makefile.in @@ -5,6 +5,10 @@ THIS = Makefile @SET_MAKE@ +prefix =@prefix@ +exec_prefix =$(DESTDIR)@exec_prefix@ +libdir =$(exec_prefix)/lib + PDCURSES_SRCDIR = .. osdir = . @@ -27,16 +31,18 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @DEFS@ -DXCURSES @SYS_DEFS@ -I$(PDCURSES_SRCDIR) -BUILD = @CC@ -c $(CFLAGS) $(CPPFLAGS) @MH_XINC_DIR@ +BUILD = $(LIBTOOL) --mode=compile $(O_BUILD) +O_BUILD = @CC@ -c $(CFLAGS) $(CPPFLAGS) @MH_XINC_DIR@ DYN_BUILD = @O2SAVE@ $(BUILD) @DYN_COMP@ @CC2O@ -LINK = @PURIFY@ @CC@ +LINK = $(LIBTOOL) --mode=link @CC@ #LDFLAGS = $(LIB_DEPS) @LDFLAGS@ @LIBS@ @MH_XLIBS@ @MH_EXTRA_LIBS@ -LDFLAGS = $(LIBCURSES) @LDFLAGS@ @LIBS@ @MH_XLIBS@ @MH_EXTRA_LIBS@ +LTLDFLAGS = @LDFLAGS@ @LIBS@ @MH_XLIBS@ @MH_EXTRA_LIBS@ +LDFLAGS = $(LIBCURSES) $(LTLDFLAGS) RANLIB = @RANLIB@ -LIBCURSES = libXCurses.a +LIBCURSES = libXCurses.la LIB_DEPS = -L$(PDCURSES_SRCDIR)/x11 -lXCurses @@ -49,7 +55,7 @@ tuidemo.o worm.o xmas.o SHLFILE = XCurses ######################################################################### -all: $(PDCLIBS) $(DEMOS) +all: $(LIBCURSES) $(DEMOS) install: echo Does nothing at the moment @@ -84,8 +90,8 @@ PDCSHOBJS = $(PDCOBJS:.o=.sho) SHOFILES = $(LIBSHOBJS) $(PDCSHOBJS) $(LIBCURSES) : $(LIBOBJS) $(PDCOBJS) - ar rv $@ $? - -$(RANLIB) $@ + $(LIBTOOL) --mode=link $(CC) -o $@ -rpath $(libdir) $(LTLDFLAGS) \ + $(LIBOBJS:.o=.lo) $(PDCOBJS:.o=.lo) $(SHLPRE)$(SHLFILE)$(SHLPST) : $(SHOFILES) $(LD_RXLIB1) -o $@ $(SHOFILES) $(LD_RXLIB2) @@ -499,31 +505,31 @@ xmas: xmas.o firework.o: $(demodir)/firework.c - $(BUILD) $(demodir)/firework.c + $(O_BUILD) $(demodir)/firework.c newdemo.o: $(demodir)/newdemo.c - $(BUILD) $(demodir)/newdemo.c + $(O_BUILD) $(demodir)/newdemo.c ptest.o: $(demodir)/ptest.c $(PDCURSES_SRCDIR)/panel.h - $(BUILD) $(demodir)/ptest.c + $(O_BUILD) $(demodir)/ptest.c rain.o: $(demodir)/rain.c - $(BUILD) $(demodir)/rain.c + $(O_BUILD) $(demodir)/rain.c testcurs.o: $(demodir)/testcurs.c - $(BUILD) $(demodir)/testcurs.c + $(O_BUILD) $(demodir)/testcurs.c tui.o: $(demodir)/tui.c $(demodir)/tui.h - $(BUILD) $(demodir)/tui.c + $(O_BUILD) $(demodir)/tui.c tuidemo.o: $(demodir)/tuidemo.c - $(BUILD) $(demodir)/tuidemo.c + $(O_BUILD) $(demodir)/tuidemo.c worm.o: $(demodir)/worm.c - $(BUILD) $(demodir)/worm.c + $(O_BUILD) $(demodir)/worm.c xmas.o: $(demodir)/xmas.c - $(BUILD) $(demodir)/xmas.c + $(O_BUILD) $(demodir)/xmas.c # # This section provides for compiling and linking the @@ -562,22 +568,22 @@ ncurses: ncurses.o $(LIBCURSES) $(LINK) ncurses.o -o $@ $(LDFLAGS) bs.o: $(ncurses_testdir)/bs.c $(PDCURSES_CURSES_H) - $(BUILD) $(NCFLAGS) $(ncurses_testdir)/bs.c + $(O_BUILD) $(NCFLAGS) $(ncurses_testdir)/bs.c gdc.o: $(ncurses_testdir)/gdc.c $(PDCURSES_CURSES_H) - $(BUILD) $(NCFLAGS) $(ncurses_testdir)/gdc.c + $(O_BUILD) $(NCFLAGS) $(ncurses_testdir)/gdc.c hanoi.o: $(ncurses_testdir)/hanoi.c $(PDCURSES_CURSES_H) - $(BUILD) $(NCFLAGS) $(ncurses_testdir)/hanoi.c + $(O_BUILD) $(NCFLAGS) $(ncurses_testdir)/hanoi.c knight.o: $(ncurses_testdir)/knight.c $(PDCURSES_CURSES_H) - $(BUILD) $(NCFLAGS) $(ncurses_testdir)/knight.c + $(O_BUILD) $(NCFLAGS) $(ncurses_testdir)/knight.c tclock.o: $(ncurses_testdir)/tclock.c $(PDCURSES_CURSES_H) - $(BUILD) $(NCFLAGS) $(ncurses_testdir)/tclock.c + $(O_BUILD) $(NCFLAGS) $(ncurses_testdir)/tclock.c view.o: $(ncurses_testdir)/view.c $(PDCURSES_CURSES_H) - $(BUILD) $(NCFLAGS) $(ncurses_testdir)/view.c + $(O_BUILD) $(NCFLAGS) $(ncurses_testdir)/view.c ncurses.o: $(ncurses_testdir)/ncurses.c $(PDCURSES_CURSES_H) - $(BUILD) $(NCFLAGS) $(ncurses_testdir)/ncurses.c + $(O_BUILD) $(NCFLAGS) $(ncurses_testdir)/ncurses.c