-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.in
executable file
·113 lines (86 loc) · 3.27 KB
/
Makefile.in
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
105
106
107
108
109
110
111
112
113
#-------------------------------------------------------------------------------
# Project Specific Parameters
#-------------------------------------------------------------------------------
include Make.defines
#-------------------------------------------------------------------------------
# Directories
#-------------------------------------------------------------------------------
PREFIX = @prefix@
DESTDIR =
BINDIR = $(DESTDIR)/$(PREFIX)/bin
INCDIR = $(DESTDIR)/$(PREFIX)/include
LIBDIR = $(DESTDIR)/$(PREFIX)/lib
INFODIR = $(DESTDIR)/$(PREFIX)/info
MANDIR = $(DESTDIR)/$(PREFIX)/man
TOP_SRCDIR = @top_srcdir@
SRCDIR = @srcdir@
include @MAKE_DEFINES@
#-------------------------------------------------------------------------------
# Compile Options
#-------------------------------------------------------------------------------
CPP = g++
CC = gcc
CFLAGS = $(ADDLCFLAGS) $(INCPATHS) \
$(PROFILING) $(MEM_TRACING) $(DEBUGGING) $(TRACING)
CPPFLAGS = @CPPFLAGS@ $(ADDCPPFLAGS)
LDFLAGS = @LDFLAGS@ $(ADDLDFLAGS)
LIBS = @LIBS@ $(ADDLIBS)
INSTALL = @INSTALL@
#-------------------------------------------------------------------------------
# Targets
#-------------------------------------------------------------------------------
LIBVER = @VERSION@
A_LIB = lib$(NAME).a
S_LIB = lib$(NAME).$(DSO_EXTENSION)
VS_LIB = $(S_LIB).$(LIBVER)
PROGS = all
FILES =
LIBFILES = lib.o example.o fs.o common.o
HDR =
CLEANFILES = gmon.out prof.txt *core \
*.o *~ *.$(DSO_EXTENSION) *.a
BUILDFILES = config.h autoscan.log config.status \
tmp.txt configure config.log configure.scan
#-------------------------------------------------------------------------------
# Build Programs
#-------------------------------------------------------------------------------
AR = ar
ARFLAGS = cru
#-------------------------------------------------------------------------------
# Build
#-------------------------------------------------------------------------------
# Build the library and test program
all: program shared
# Build both a shared and static library
lib: shared static
program: $(LIBFILES) main.o sqlite3.o
$(CC) $(LINKFLAGS) -o program main.o sqlite3.o $(LDFLAGS) $(LIBS) -ldl
# Share library
shared: $(LIBFILES)
$(CC) -shared $(LINKFLAGS) -o $(S_LIB) $(LIBFILES) $(LDFLAGS) $(LIBS)
clean:
rm -f ${PROGS} ${CLEANFILES} program
distclean: clean
rm -f ${BUILDFILES}
.cpp.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
#-------------------------------------------------------------------------------
# Autoconf
#-------------------------------------------------------------------------------
# automatic re-running of configure if the ocnfigure.in file has changed
${SRCDIR}/configure: configure.in
cd ${SRCDIR} && autoconf
# autoheader might not change config.h.in, so touch a stamp file
${SRCDIR}/config.h.in: stamp-h.in
${SRCDIR}/stamp-h.in: configure.in aclocal.m4
cd ${SRCDIR} && autoheader
echo timestamp > ${SRCDIR}/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck