blob: a17ac03e0ab26de56c763a100759d26a8de16439 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
$NetBSD: patch-ac,v 1.10 2000/09/06 12:44:38 tron Exp $
--- compface/Makefile.orig Thu Oct 24 03:28:06 1991
+++ compface/Makefile Wed Sep 6 14:39:35 2000
@@ -19,62 +19,67 @@
#
#SYSV = -DSYSV32
#--------------------------------------------------------------------------
-# BINDIR, LIBDIR, and MANDIR are expected to be overridden by the
+# BINDIR, LIBDIR, INCDIR and MANDIR are expected to be overridden by the
# calling Makefile
-BINDIR = /usr/local/bin
-LIBDIR = /usr/local/lib
-MANDIR = /usr/manl
+BINDIR = $(PREFIX)/bin
+LIBDIR = $(PREFIX)/lib
+INCDIR = $(PREFIX)/include
+MANDIR = $(PREFIX)/man
NAME = compface
UNNAME = uncompface
EXECUTABLE = $(BINDIR)/$(NAME)
UNEXECUTABLE = $(BINDIR)/$(UNNAME)
LIBNAME = lib$(NAME).a
-LIBRARY = $(LIBDIR)/$(LIBNAME)
+SHLIB_MAJOR = 1
+SHLIB_MINOR = 0
+SHLIB_FULLVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR)
+LIB = $(NAME)
+NOPROFILE = ''
+LIBRARY = $(LIBDIR)
MAN1DIR = $(MANDIR)/man1
MAN3DIR = $(MANDIR)/man3
OBJECTS = arith.o file.o compress.o gen.o uncompface.o
SOURCES = compface.c uncompface.o arith.c file.c compress.c gen.c \
cmain.c uncmain.c
+SRCS = arith.c file.c compress.c gen.c uncompface.c
HDRS = compface.h data.h
OTHERS = README $(NAME).1 $(NAME).3 Makefile
CC = cc
CDEFS = $(SYSV)
-CCOMP = -g
+CCOMP = -pipe -O2
CFLAGS = $(CDEFS) $(CCOMP)
-all: $(NAME) $(UNNAME)
+all: lib$(NAME).a lib$(NAME).so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $(NAME) $(UNNAME)
-$(NAME) : cmain.o compface.o $(LIBNAME)
- $(CC) $(CFLAGS) -o $(NAME) cmain.o compface.o $(LIBNAME)
+$(NAME) : cmain.o compface.o
+ $(CC) $(CFLAGS) -o $(NAME) cmain.o compface.o -L. \
+ -L@localbase@/lib -Wl,-R@localbase@/lib -lcompface
$(UNNAME) : uncmain.o $(LIBNAME)
- $(CC) $(CFLAGS) -o $(UNNAME) uncmain.o $(LIBNAME)
-
-$(LIBNAME) : $(OBJECTS)
- ar rc $(LIBNAME) $(OBJECTS)
- -ranlib $(LIBNAME)
+ $(CC) $(CFLAGS) -o $(UNNAME) uncmain.o -L. \
+ -L@localbase@/lib -Wl,-R@localbase@/lib -lcompface
lint :
lint -abchx $(SOURCES)
clean :
- rm -f *.o *.a *.sh core a.out $(NAME) $(UNNAME)
+ rm -f *.o *po *so *.a *.so.* *.sh core a.out $(NAME) $(UNNAME)
install : $(NAME) $(UNNAME) $(LIBNAME)
- -cp $(NAME) $(EXECUTABLE)
- strip $(EXECUTABLE)
- -cp $(UNNAME) $(UNEXECUTABLE)
- strip $(UNEXECUTABLE)
- -cp $(NAME).1 $(MAN1DIR)
- rm -f $(MAN1DIR)/$(UNNAME).1
- -ln $(MAN1DIR)/$(NAME).1 $(MAN1DIR)/$(UNNAME).1
- -cp $(LIBNAME) $(LIBRARY)
- -cp $(NAME).3 $(MAN3DIR)
- rm -f $(MAN3DIR)/$(UNNAME).3
- -ln $(MAN3DIR)/$(NAME).3 $(MAN3DIR)/$(UNNAME).3
+ install -c -s -o bin -m 755 $(NAME) $(EXECUTABLE)
+ install -c -s -o bin -m 755 $(UNNAME) $(UNEXECUTABLE)
+ install -c -g bin -o bin -m 444 $(NAME).1 $(MAN1DIR)
+ -rm -f $(MAN1DIR)/$(UNNAME).1*
+ ln -f -s $(MAN1DIR)/$(NAME).1 $(MAN1DIR)/$(UNNAME).1
+ install -c -o bin -m 444 $(LIBNAME) $(LIBRARY)
+ install -c -o bin -m 444 lib$(NAME).so.$(SHLIB_MAJOR).$(SHLIB_MINOR) $(LIBRARY)
+ install -c -g bin -o bin -m 444 $(NAME).3 $(MAN3DIR)
+ rm -f $(MAN3DIR)/$(UNNAME).3*
+ ln -f -s $(MAN3DIR)/$(NAME).3 $(MAN3DIR)/$(UNNAME).3
+ install -m 444 -o bin -g bin -c compface.h $(INCDIR)
shar :
shar.script $(OTHERS) $(HDRS) $(SOURCES) > $(NAME).sh
@@ -88,3 +93,5 @@
gen.o: gen.c compface.h data.h
uncmain.o: uncmain.c compface.h data.h
uncompface.o: uncompface.c compface.h data.h
+
+.include <bsd.lib.mk>
|