aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2001-10-23 04:56:49 +0000
committerH. Peter Anvin <hpa@zytor.com>2001-10-23 04:56:49 +0000
commit03615bdc63d821a8885cda7637701619a8d61ab2 (patch)
tree21d187e51333d9bae6058fdf5e80320855fad5b3 /Makefile
parent7f292cecee3b603b5e1ccea57da0ba59dc113f3c (diff)
downloadlpsm-03615bdc63d821a8885cda7637701619a8d61ab2.tar.gz
lpsm-03615bdc63d821a8885cda7637701619a8d61ab2.tar.xz
lpsm-03615bdc63d821a8885cda7637701619a8d61ab2.zip
Add man pageslpsm-0.1.4
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 14 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 61b2243..d3ac6ae 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ CFILES = arena.c bitops.c \
mgmt.c malloc.c free.c realloc.c zalloc.c calloc.c stats.c
OSOBJ = $(patsubst %.c,%.o,$(CFILES))
OSPICOBJ = $(patsubst %.c,%.pic.o,$(CFILES))
+MANPAGES = $(patsubst %.in,%,$(wildcard *.[1-9].in))
CC = gcc
# This is a reasonable set of flags for production
@@ -35,7 +36,11 @@ man1dir = $(mandir)/man1
man3dir = $(mandir)/man3
-all: $(LIBPSM) $(TEST)
+all: $(LIBPSM) test man
+
+test: $(TEST)
+
+man: $(MANPAGES)
clean:
rm -f *.o *~ core *.dat *.log $(LIBPSM) $(TEST)
@@ -45,11 +50,14 @@ distclean: clean
rm -f *~ \#* .depend
install: all
- mkdir -p $(INSTALLROOT)$(includedir) $(INSTALLROOT)$(libdir)
- $(INSTALL) lpsm.h $(INSTALLROOT)$(includedir)
+ mkdir -p $(INSTALLROOT)$(includedir)
+ mkdir -p $(INSTALLROOT)$(libdir)
+ mkdir -p $(INSTALLROOT)$(man3dir)
$(INSTALL) $(LIBPSM) $(INSTALLROOT)$(libdir)
cd $(INSTALLROOT)$(libdir) && ln -sf libpsm.so.$(VERSION) $(SONAME)
cd $(INSTALLROOT)$(libdir) && ln -sf libpsm.so.$(VERSION) libpsm.so
+ $(INSTALL) lpsm.h $(INSTALLROOT)$(includedir)
+ $(INSTALL) $(MANPAGES) $(INSTALLROOT)$(man3dir)
ldconfig
%.o: %.c
@@ -58,6 +66,9 @@ install: all
%.pic.o: %.c
$(CC) $(PICFLAGS) -o $@ -c $<
+%: %.in
+ sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
+
libpsm.so.$(VERSION): $(OSPICOBJ)
$(CC) $(SOFLAGS) -Wl,-soname,$(SONAME) -o libpsm.so.$(VERSION) $(OSPICOBJ)
ln -sf libpsm.so.$(VERSION) $(SONAME)