112 lines
3.2 KiB
Plaintext
112 lines
3.2 KiB
Plaintext
--- pgm/Makefile.orig Fri Jan 28 11:14:02 1994
|
|
+++ pgm/Makefile Mon Jan 11 00:18:46 1999
|
|
@@ -18,14 +18,16 @@
|
|
#CFLAGS = -g -O
|
|
LDFLAGS = -s
|
|
#LDFLAGS =
|
|
-INSTALLBINARIES = /usr/new/pbm
|
|
-INSTALLMANUALS1 = /usr/man/man1
|
|
+INSTALLBINARIES = $(PREFIX)/bin
|
|
+INSTALLMANUALS1 = $(PREFIX)/man/man1
|
|
SUFFIXMANUALS1 = 1
|
|
-INSTALLMANUALS3 = /usr/man/man3
|
|
+INSTALLMANUALS3 = $(PREFIX)/man/man3
|
|
SUFFIXMANUALS3 = 3
|
|
-INSTALLMANUALS5 = /usr/man/man5
|
|
+INSTALLMANUALS5 = $(PREFIX)/man/man5
|
|
SUFFIXMANUALS5 = 5
|
|
-MANCP = cp
|
|
+MANCP = install -c -m 0644
|
|
+INSTALLLIBS = $(PREFIX)/lib
|
|
+INSTALLDEFS = $(PREFIX)/include
|
|
|
|
PBMDIR = ../pbm
|
|
INCLUDEPBM = -I$(PBMDIR)
|
|
@@ -37,12 +39,13 @@
|
|
INCLUDE = -I.. $(INCLUDEPBM)
|
|
ALLCFLAGS = $(CFLAGS) $(INCLUDE)
|
|
LIBPGM = libpgm.a
|
|
+DEFPGM = pgm.h
|
|
|
|
PORTBINARIES = asciitopgm bioradtopgm fstopgm hipstopgm \
|
|
- lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist pgmkernel \
|
|
+ lispmtopgm pbmtopgm pgmbentley pgmenhance pgmhist \
|
|
pgmnoise pgmnorm pgmoil pgmramp pgmtofs pgmtolispm \
|
|
pgmtopbm psidtopgm spottopgm
|
|
-MATHBINARIES = pgmcrater pgmedge pgmtexture rawtopgm
|
|
+MATHBINARIES = pgmcrater pgmedge pgmtexture rawtopgm pgmkernel
|
|
BINARIES = $(PORTBINARIES) $(MATHBINARIES)
|
|
|
|
OBJECTS = asciitopgm.o bioradtopgm.o fstopgm.o hipstopgm.o \
|
|
@@ -56,18 +59,19 @@
|
|
MANUALS5 = pgm
|
|
|
|
|
|
-#all: binaries
|
|
-all: merge
|
|
-#install: install.bin
|
|
-install: install.merge
|
|
+all: binaries
|
|
+#all: merge
|
|
+install: install.bin
|
|
+#install: install.merge
|
|
|
|
|
|
binaries: $(BINARIES)
|
|
|
|
install.bin: binaries
|
|
cd $(INSTALLBINARIES) ; rm -f $(BINARIES)
|
|
- cp $(BINARIES) $(INSTALLBINARIES)
|
|
-
|
|
+ install -c -s -m 0755 $(BINARIES) $(INSTALLBINARIES)
|
|
+ install -c -m 0644 $(LIBPGM) $(INSTALLLIBS)
|
|
+ install -c -m 0644 $(DEFPGM) $(INSTALLDEFS)
|
|
|
|
merge: pgmmerge
|
|
pgmmerge: pgmmerge.c $(OBJECTS) $(LIBPGM) $(LIBPBM)
|
|
@@ -97,15 +101,15 @@
|
|
|
|
|
|
# Rule for plain programs.
|
|
-$(PORTBINARIES): pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM)
|
|
+$(PORTBINARIES): $(DEFPGM) $(DEFPBM) $(LIBPGM) $(LIBPBM)
|
|
$(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPGM) $(LIBPBM)
|
|
|
|
# Rule for math-dependent programs.
|
|
-$(MATHBINARIES): pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM)
|
|
+$(MATHBINARIES): $(DEFPGM) $(DEFPBM) $(LIBPGM) $(LIBPBM)
|
|
$(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c -lm $(LIBPGM) $(LIBPBM)
|
|
|
|
# Rule for objects.
|
|
-$(OBJECTS): pgm.h $(DEFPBM)
|
|
+$(OBJECTS): $(DEFPGM) $(DEFPBM)
|
|
$(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c
|
|
|
|
# And libraries.
|
|
@@ -117,9 +121,9 @@
|
|
ar rc $(LIBPGM) libpgm1.o libpgm2.o
|
|
-ranlib $(LIBPGM)
|
|
|
|
-libpgm1.o: pgm.h $(DEFPBM) libpgm.h libpgm1.c
|
|
+libpgm1.o: $(DEFPGM) $(DEFPBM) lib$(DEFPGM) libpgm1.c
|
|
$(CC) $(ALLCFLAGS) -c libpgm1.c
|
|
-libpgm2.o: pgm.h $(DEFPBM) libpgm.h libpgm2.c $(DEFLIBPBM)
|
|
+libpgm2.o: $(DEFPGM) $(DEFPBM) lib$(DEFPGM) libpgm2.c $(DEFLIBPBM)
|
|
$(CC) $(ALLCFLAGS) -c libpgm2.c
|
|
|
|
# Other dependencies.
|
|
@@ -134,7 +138,6 @@
|
|
pgmedge pgmedge.o: pgmedge.c
|
|
pgmenhance pgmenhance.o: pgmenhance.c
|
|
pgmhist pgmhist.o: pgmhist.c
|
|
-pgmkernel pgmkernel.o: pgmkernel.c
|
|
pgmnoise pgmnoise.o: pgmnoise.c
|
|
pgmnorm pgmnorm.o: pgmnorm.c
|
|
pgmoil pgmoil.o: pgmoil.c
|
|
@@ -148,4 +151,4 @@
|
|
spottopgm spottopgm.o: spottopgm.c
|
|
|
|
clean:
|
|
- -rm -f *.o *.a *.cat *~ core $(BINARIES) pgmmerge
|
|
+ -rm -f *.o *.a *.cat *~ core *.core $(BINARIES) pgmmerge
|