DCL 3.7.6
Loading...
Searching...
No Matches
src/SQLSQLCipher/Makefile.dso
Go to the documentation of this file.
1VPATH := $(VPATH):$(SOURCE_ROOT)/src/SQLSQLite3
2OBJS := SqTypes.o SqField.o SqParam.o SqQuery.o \
3 SqConnection.o SqModuleMain.o
4
5INSTALL := $(OUTPUT_ROOT)/lib
6
7ifdef __DCL_DEBUG
8 LDFLAGS += -lDCLCoreD
9 NAME := DCLSQLCipherD
10else
11 LDFLAGS += -lDCLCore
12 NAME := DCLSQLCipher
13endif
14
15ifneq ($(findstring MINGW, $(UNAME)),)
16 CXFLAGS += -I$(PKG_CONFIG_SYSTEM_INCLUDE_PATH)/sqlcipher
17else ifneq ($(findstring Darwin, $(UNAME)),)
18 CXFLAGS += -I/usr/local/include/sqlcipher
19else ifneq ($(findstring FreeBSD, $(UNAME)),)
20 CXFLAGS += -I/usr/local/include/sqlcipher
21 LDFLAGS += -L/usr/local/lib
22else
23 CXFLAGS += -I/usr/include/sqlcipher
24endif
25
26CXFLAGS += -DSQLITE_HAS_CODEC=1
27LDFLAGS += -lsqlcipher
28
29ifneq ($(findstring MINGW, $(UNAME)),)
30 TARGET := $(NAME).dll
31else ifneq ($(findstring AIX, $(UNAME)),)
32 SONAME := $(NAME).so
33 TARGET := $(SONAME).$(VERSION)
34 LDFLAGS := -Wl,-G,-brtl $(LDFLAGS)
35else ifneq ($(findstring Darwin, $(UNAME)),)
36 SONAME := $(NAME).dylib
37 TARGET := $(SONAME).$(VERSION)
38 LDFLAGS := -dynamiclib $(LDFLAGS)
39else
40 SONAME := $(NAME).so
41 TARGET := $(SONAME).$(VERSION)
42 LDFLAGS := -Wl,-soname,$(SONAME) $(LDFLAGS)
43endif
44
45all: $(TARGET) install
46
47$(TARGET): $(OBJS)
48 $(LD) $(OBJS) -shared $(LDFLAGS) -o $(TARGET)
49
50install:
51 $(CP) $(NAME)* $(INSTALL)/
52ifdef SONAME
53 cd $(INSTALL); $(LN) -sf $(TARGET) $(SONAME)
54endif
55
56clean:
57 $(RM) -f $(OBJS) $(TARGET)