-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile.win
More file actions
67 lines (54 loc) · 2.03 KB
/
Makefile.win
File metadata and controls
67 lines (54 loc) · 2.03 KB
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
# -*- makefile -*- mode
# Makefile for windows (mingw)
# object files
OBJ = turbulence.o \
turbulence-config.o \
turbulence-run.o \
turbulence-module.o \
turbulence-log.o \
turbulence-ppath.o \
turbulence-db-list.o \
turbulence-conn-mgr.o \
turbulence-signal.o \
turbulence-ctx.o \
turbulence-expr.o \
exarg.o
DLL = $(turbulence_dll).dll
IMPORT_DLL = $(DLL).a
STATIC_LIB = $(turbulence_dll).a
# libraries
LIBS = -Wall -g \
-L"../../libaxl/src/" -L"../../libvortex-1.1/src/" \
-lvortex-1.1 -laxl -lws2_32 $(OPENSSL_LIBS) $(GSASL_LIBS) $(PCRE_LIBS) $(search_lib_path)
# build vortex with log support
INCS = -Wall -g -I"." -I"../../libaxl/src" -I"../../libvortex-1.1/src"
# datadir and sysconfdir
datadir = "../data"
sysconfdir = "../etc"
pidfile = "../var/run/turbulence.pid"
CFLAGS = $(INCS) -DVERSION=\""$(TURBULENCE_VERSION)"\" -DVORTEX_VERSION=\""$(VORTEX_VERSION)"\" -DAXL_VERSION=\""$(AXL_VERSION)"\" \
-DPACKAGE_DTD_DIR=\""$(datadir)"\" -DPACKAGE_TOP_DIR=\""$(top_srcdir)"\" -Wall -g $(OPENSSL_FLAGS) $(GSASL_FLAGS) $(PCRE_FLAGS) \
-DCOMPILATION_DATE=`date +%s` -D__COMPILING_TURBULENCE__ -DOS_WIN32 \
-DSYSCONFDIR=\""$(sysconfdir)"\" -DTBC_DATADIR=\""$(datadir)"\" -DPIDFILE=\""$(pidfile)"\"
RM = rm -f
.PHONY: all clean
all: $(DLL) turbulence.exe links
clean:
${RM} $(OBJ) $(DLL) main.o *.a *.dll.a *.lib *.dll
$(DLL): $(OBJ)
# add the following line to create an import library. At this point this step
# is not requiered because gcc automatically get an import library from the dll.
# -Wl,--out-implib,libvortex.lib
$(CC) -mconsole -shared -Wl,--out-implib,$(IMPORT_DLL) --export-all-symbols \
$(OBJ) -o $(DLL) $(LIBS)
lib.exe /def:libturbulence.def
turbulence.exe: main.o
$(CC) -mconsole $(OBJ) $< -o $@ $(LIBS)
links:
cp ../../libvortex-1.1/src/libvortex-1.1.dll .
cp ../../libvortex-1.1/data/*.dtd .
cp ../../libaxl/src/libaxl.dll .
cp ../../libexarg/src/libexarg.dll .
cp $(OPENSSL_LIBS) .
%.o: %.c
$(CC) -c $< -o $@ $(CFLAGS)