blob: 137664cebe7d7caa1acdadebfa0d634fd0004486 (
plain) (
blame)
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
|
--- Makefile.orig Thu Nov 21 06:09:41 2002
+++ Makefile Sat Nov 23 17:40:57 2002
@@ -1,17 +1,17 @@
-prefix = /usr/local
+prefix = ${PREFIX}
includedir = $(prefix)/include
libdir = $(prefix)/lib
mandir = $(prefix)/man
-CC = gcc
+CC ?= gcc
LIBNAME = mba
-MAJVERSION = 0.4
-MINVERSION = 0.4.6
+MAJVERSION = ${SHLIB_MAJOR}
+MINVERSION = ${SHLIB_MAJOR}
ARNAME = lib$(LIBNAME).a
SONAME = lib$(LIBNAME).so.$(MINVERSION)
SOVERSION = lib$(LIBNAME).so.$(MAJVERSION)
DISTRO = lib$(LIBNAME)-$(MINVERSION)
RPM_OPT_FLAGS = -O2
-CFLAGS = -Wall -W -DMSGNO -I$(includedir) -L$(libdir) $(RPM_OPT_FLAGS)
+CFLAGS += -DMSGNO -I${LOCALBASE}/include
#CFLAGS = -Wall -W -DMSGNO -I$(includedir) -L$(libdir) $(RPM_OPT_FLAGS) -ansi -pedantic -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wtraditional -Wconversion -Waggregate-return -Wno-parentheses
OBJS = src/stack.o src/linkedlist.o src/hashmap.o src/profile.o src/hexdump.o src/msgno.o src/domnode.o src/mbs.o src/cfg.o
HDRS = src/mba/msgno.h src/mba/stack.h src/mba/linkedlist.h src/mba/hashmap.h src/mba/hexdump.h src/mba/domnode.h src/mba/profile.h src/mba/mbs.h src/mba/cfg.h
@@ -20,7 +20,7 @@
all: $(ARNAME)($(OBJS)) $(SONAME)
$(SONAME): $(ARNAME)($(OBJS)) $(OBJS)
- $(CC) -shared $(OBJS) -L$(libdir) -lc -lexpat -Wl,-h,$(SOVERSION) -o $(SONAME)
+ $(CC) -shared $(OBJS) -L${LOCALBASE}/lib -lexpat -Wl,-h,$(SOVERSION) -o $(SONAME)
.c.a:
$(CC) $(CFLAGS) -c $< -o $*.o
@@ -31,15 +31,14 @@
$(CC) $(CFLAGS) -fpic -c -o $*.o $<
install: $(SONAME)
- install -d $(libdir)
- install -d $(includedir)/mba
- install -d $(mandir)/man3
- install -m 644 $(ARNAME) $(libdir)
- install -m 755 $(SONAME) $(libdir)
+ mkdir -p $(libdir)
+ mkdir -p $(includedir)/mba
+ mkdir -p $(mandir)/man3
+ ${BSD_INSTALL_DATA} $(ARNAME) $(libdir)
+ ${BSD_INSTALL_DATA} $(SONAME) $(libdir)
cd $(libdir) && ln -sf $(SONAME) $(SOVERSION) && ln -sf $(SONAME) lib$(LIBNAME).so
- install -m 444 $(HDRS) $(includedir)/mba
- -install -m 444 docs/man/*.3m.gz $(mandir)/man3
- -/sbin/ldconfig $(libdir)
+ ${BSD_INSTALL_DATA} $(HDRS) $(includedir)/mba
+ ${BSD_INSTALL_MAN} docs/man/*.3m.gz $(mandir)/man3
zip:
cd .. && zip -lr $(DISTRO)/.$(DISTRO).zip $(DISTRO) -x $(DISTRO)/.* $(DISTRO)/docs/man/* $(DISTRO)/tests/data* $(DISTRO)/libmba.lib $(DISTRO)/libmba.dll $(DISTRO)/libmba_s.lib
|