forked from phambryan/hiberlite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (21 loc) · 800 Bytes
/
Makefile
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
INSTALL_PREFIX = /usr
INSTALL_HEADERS = $(INSTALL_PREFIX)/include/hiberlite
INSTALL_LIB = $(INSTALL_PREFIX)/lib
all : libhiberlite.a tests sample
OBJS=BeanLoader.o BeanUpdater.o ChildKiller.o CppModel.o Database.o ModelExtractor.o Registry.o SQLiteStmt.o Visitor.o shared_res.o
CXXFLAGS=-Iinclude/ -Wall
LDFLAGS=-lsqlite3
libhiberlite.a : $(OBJS)
ar -r -s libhiberlite.a $(OBJS)
tests : libhiberlite.a
install :
mkdir -p $(INSTALL_HEADERS)
cp include/* $(INSTALL_HEADERS)/
mkdir -p $(INSTALL_LIB)
cp libhiberlite.a $(INSTALL_LIB)/
%.o : src/%.cpp include/*
g++ -c $(CXXFLAGS) $< -o $@
tests : tests.cpp libhiberlite.a
g++ $(CXXFLAGS) -L./ tests.cpp -o tests -lhiberlite $(LDFLAGS)
sample : sample.cpp libhiberlite.a
g++ $(CXXFLAGS) -L./ sample.cpp -o sample -lhiberlite $(LDFLAGS)