--- Makefile.orig 2004-09-09 22:31:42 UTC +++ Makefile @@ -1,7 +1,7 @@ -prefix = /usr/local +prefix ?= /usr/local includedir = $(prefix)/include libdir = $(prefix)/lib -mandir = $(prefix)/man +mandir = $(prefix)/share/man CC = gcc LIBNAME = domc MAJVERSION = 0.8 @@ -16,10 +16,10 @@ MAN = DOM_CharacterData.3m.gz DOM_Document.3m.g OBJS = src/expatls.o src/events.o src/node.o src/nodelist.o src/namednodemap.o src/dom.o src/timestamp.o src/wcwidth.o src/mbs.o MAN = DOM_CharacterData.3m.gz DOM_Document.3m.gz DOM_Element.3m.gz DOM_Implementation.3m.gz DOM_NamedNodeMap.3m.gz DOM_Node.3m.gz DOM_NodeList.3m.gz DOM_Text.3m.gz -all: $(ARNAME)($(OBJS)) $(SONAME) src/defines.h +all: $(SONAME) src/defines.h $(SONAME): $(OBJS) - $(CC) -shared $(OBJS) -L$(libdir) -lmba -lexpat -Wl,-h,$(SOVERSION) -o $(SONAME) + $(CC) $(LDFLAGS) -shared $(OBJS) -L$(libdir) -lmba -lexpat -Wl,-h,$(SOVERSION) -o $(SONAME) .c.a: $(CC) $(CFLAGS) -c -o $*.o $< @@ -29,16 +29,15 @@ $(SONAME): $(OBJS) .c.o: $(CC) $(CFLAGS) -fpic -c -o $*.o $< +install: prefix=$(INSTDIR) install: $(SONAME) install -d $(libdir) install -d $(includedir) install -d $(mandir)/man3 - install -m 644 $(ARNAME) $(libdir) - install -m 755 $(SONAME) $(libdir) + ${BSD_INSTALL_LIB} $(SONAME) $(libdir) cd $(libdir) && ln -sf $(SONAME) $(SOVERSION) && ln -sf $(SONAME) lib$(LIBNAME).so - install -m 444 src/domc.h $(includedir) - -install -m 444 docs/man/*.3m.gz $(mandir)/man3 - -/sbin/ldconfig $(libdir) + ${BSD_INSTALL_DATA} src/domc.h $(includedir) + ${BSD_INSTALL_DATA} docs/man/*.3m.gz $(mandir)/man3 zip: cd .. && zip -lr $(DISTRO)/.$(DISTRO).zip $(DISTRO) -x $(DISTRO)/.* $(DISTRO)/docs/man/* $(DISTRO)/tests/utf8* $(DISTRO)/domc.lib $(DISTRO)/domc.dll $(DISTRO)/domc_s.lib