--- book/Makefile.orig 2015-10-26 10:22:55 UTC +++ book/Makefile @@ -12,13 +12,13 @@ EXAMPLES=simple_html simple_html2 autosi # The library XMHTMLINC= -I../lib -XMHTMLLIB= -L../lib -lXmHTML +XMHTMLLIB= ../lib/libXmHTML.la LINKLIBS = $(XMHTMLLIB) $(LOADLIBES) $(DMALLOCLIB) # rule to create .o files from .c files .c.o: $(RM) $@ - $(CC) $(CFLAGS) $(CPPFLAGS) $(XMHTMLINC) $(INCLUDES) -c $< + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS) $(XMHTMLINC) $(INCLUDES) -c $< all: $(EXAMPLES) @@ -26,27 +26,27 @@ all: $(EXAMPLES) simple_html:: ../src/libXmHTML.a simple_html.o $(RM) $@ \ - $(CC) -o $@ $(LDFLAGS) simple_html.o $(LINKLIBS) + $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) simple_html.o $(LINKLIBS) simple_html2:: ../src/libXmHTML.a simple_html2.o $(RM) $@ \ - $(CC) -o $@ $(LDFLAGS) simple_html2.o $(LINKLIBS) + $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) simple_html2.o $(LINKLIBS) autosize_html:: ../src/libXmHTML.a autosize_html.o $(RM) $@ \ - $(CC) -o $@ $(LDFLAGS) autosize_html.o $(LINKLIBS) + $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) autosize_html.o $(LINKLIBS) forced_html:: ../src/libXmHTML.a forced_html.o $(RM) $@ \ - $(CC) -o $@ $(LDFLAGS) forced_html.o $(LINKLIBS) + $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) forced_html.o $(LINKLIBS) html:: ../src/libXmHTML.a html.o $(RM) $@ \ - $(CC) -o $@ $(LDFLAGS) html.o $(LINKLIBS) + $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) html.o $(LINKLIBS) html_browser:: ../src/libXmHTML.a html_browser.o $(RM) $@ \ - $(CC) -o $@ $(LDFLAGS) html_browser.o $(LINKLIBS) + $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) html_browser.o $(LINKLIBS) .PHONY: ../src/libXmHTML.a