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
|
--- makefile.orig Fri Sep 30 13:30:14 2005
+++ makefile Mon Oct 3 15:26:07 2005
@@ -33,11 +33,11 @@
SUFF=
else
ifneq (,$(findstring FreeBSD,$(OSTYPE)))
-TFLAGS=-pthread
-THRLIBS=
+TFLAGS=-D_REENTRANT ${PTHREAD_CFLAGS}
+THRLIBS=${PTHREAD_LIBS}
else
-TFLAGS=-D_REENTRANT -D_THREAD_SAFE
-THRLIBS=-lpthread
+TFLAGS=-D_REENTRANT ${PTHREAD_CFLAGS}
+THRLIBS=${PTHREAD_LIBS}
endif
SUFF=_r
endif
@@ -67,21 +67,21 @@
WEB_EXAMPLES = cgistub bugdb clidb
-CC = g++
+CC = ${CXX}
# DEFS macro is deprecatred, edit config.h file instead
DEFS =
#CFLAGS = $(TFLAGS) -Iinc -c -Wall -O5 -g -fPIC $(DEFS)
-CFLAGS = -c -Iinc -Wall -O0 -g -fPIC $(DEFS) $(TFLAGS)
+CFLAGS = -c -Iinc ${CXXFLAGS} $(DEFS) $(TFLAGS) -fPIC
#CFLAGS = -c -Iinc -Wall -O0 -fPIC -DFASTDB_DEBUG=DEBUG_TRACE -g $(DEFS) $(TFLAGS)
-#SHFLAGS=-shared -Wl,-soname,$@
-SHFLAGS=-shared
+SHFLAGS=-shared -Wl,-soname,$@
+#SHFLAGS=-shared
LD = $(CC)
-LDFLAGS = -g $(TFLAGS)
+LDFLAGS = $(TFLAGS)
AR = ar
ARFLAGS = -cru
@@ -352,23 +352,21 @@
install: subsql cleanupsem installlib
mkdir -p $(BINSPATH)
- cp subsql $(BINSPATH)
- strip $(BINSPATH)/subsql
- cp cleanupsem $(BINSPATH)
- strip $(BINSPATH)/cleanupsem
+ ${BSD_INSTALL_PROGRAM} subsql $(BINSPATH)
+ ${BSD_INSTALL_PROGRAM} cleanupsem $(BINSPATH)
installlib: $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED)
mkdir -p $(INCSPATH)
- cp $(INCS) $(INCSPATH)
+ ${BSD_INSTALL_DATA} $(INCS) $(INCSPATH)
mkdir -p $(LIBSPATH)
- cp $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED) $(JNI_LIB) $(LIBSPATH)
+ ${BSD_INSTALL_PROGRAM} $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED) $(LIBSPATH)
ln -f -s $(LIBSPATH)/$(FASTDB_SHARED) $(LIBSPATH)/libfastdb$(SUFF).so
ln -f -s $(LIBSPATH)/$(CLI_SHARED) $(LIBSPATH)/libcli$(SUFF).so
- ln -f -s $(LIBSPATH)/$(JNI_LIB) $(LIBSPATH)/libjnicli$(SUFF).so
+# ln -f -s $(LIBSPATH)/$(JNI_LIB) $(LIBSPATH)/libjnicli$(SUFF).so
uninstall:
rm -fr $(INCSPATH)
- cd $(LIBSPATH); rm -f $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED) $(JNI_LIB) libfastdb$(SUFF).so libjnicli$(SUFF).so libcli$(SUFF).so
+ cd $(LIBSPATH); rm -f $(FASTDB_LIB) $(CLI_LIB) $(FASTDB_SHARED) $(CLI_SHARED) libfastdb$(SUFF).so libcli$(SUFF).so
rm $(BINSPATH)/subsql
cleanobj:
|