-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (26 loc) · 844 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
32
33
34
CC = g++
CFLAGS = -Wall `gpgme-config --cflags`
INCLUDES = -Isrc
LIBS = -lsqlite3 `gpgme-config --libs`
OBJS = sqlite3_serializer.o gpgme_wrapper.o
TARGET = librecapcore.so
TEST_TARGET = core-tester
ifeq ($(build),debug)
CFLAGS += -ggdb -O1
else
CFLAGS += -O2
endif
$(TARGET):$(OBJS)
$(CC) $(CFLAGS) -shared -o$@ $^ $(LIBS)
sqlite3_serializer.o:src/sqlite3_serializer.cpp
$(CC) $(INCLUDES) -c $(CFLAGS) -fPIC -o$@ $<
gpgme_wrapper.o:src/gpgme_wrapper.cpp
$(CC) $(INCLUDES) -c $(CFLAGS) -fPIC -o$@ $<
clean:
rm -f $(OBJS)
distclean:clean
rm -f $(TARGET) $(TEST_TARGET)
test:$(TARGET) src/tester.cpp
$(CC) $(INCLUDES) $(CFLAGS) src/tester.cpp -o$(TEST_TARGET) -L./ -lrecapcore
regression_tests:$(TARGET) src/regression_tests.cpp
$(CC) $(INCLUDES) $(CFLAGS) src/regression_tests.cpp -o regression_tests -L./ -lrecapcore