summaryrefslogtreecommitdiff
path: root/src/Makefile.win32
blob: d3e30d0d6343e8467f9411f9ebc0457ff9ede5a3 (plain)
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
#
#	Ivy, C interface
#
#	Copyright (C) 1997-2002
#	Centre d'Études de la Navigation Aérienne
#
# 	Makefile
#
#	Authors: François-Régis Colin <fcolin@cena.fr>
# 		 Stéphane Chatty <chatty@cena.fr>
# 		 Yannick Jestin <jestin@cena.fr>
#
#	Please refer to file version.h for the
#	copyright notice regarding this software
#


# change this in version.h too !!!!
MAJOR=4
MINOR=0

PCREINC = -I "C:\Program Files\GnuWin32\include" #`pcre-config --cflags`
PCRELIB = "C:\Program Files\GnuWin32\lib\libpcre.lib" #`pcre-config --libs`

PCRE_OPT = PCRE_CASELESS
REGCOMP_OPT = REG_ICASE

#	PCRE_OPT = 0
#	REGCOMP_OPT = REG_EXTENDED	


#PCREOBJ = `pcre-config --prefix`/lib/libpcre.a
PCREOBJ = 

#CC=gcc
#CFLAGS = -g -Wall
CFLAGS = -DWIN32 -nologo -GS -Zi #-DDEBUG
#LIBTOOL=ar q # linux and solaris
#LIBTOOL=libtool -static -o
LIBTOOL=lib -nologo /out:

#REGEXP = -DGNU_REGEXP  -DREGCOMP_OPT=$(REGCOMP_OPT) # deprecated !
REGEXP= -DUSE_PCRE_REGEX -DPCRE_OPT=$(PCRE_OPT)
# on activeTCL , set #define CHANNEL to null, and add ivyloop.obj in the ivytcl target,
# see below
CHANNEL = -DTCL_CHANNEL_INTEGRATION 


OBJ = hash.obj ivyloop.obj timer.obj ivysocket.obj ivy.obj ivybind.obj ivyargument.obj

# WINDOWS add ivyloop.obj if TCL_CHANNEL_INTEGRATION is not set
TARGETS = ivyprobe.exe ivyperf.exe 
TARGETLIBS=ivy.dll

.c.obj:
	$(CC) $(CFLAGS) -c $*.c

all: static-libs commands shared-libs

static-libs: ivy-static.lib

shared-libs: $(TARGETLIBS)

commands: $(TARGETS)

ivybind.obj: ivybind.c
	$(CC) -c $(CFLAGS) $(REGEXP) $(PCREINC) ivybind.c


ivyprobe.exe: ivyprobe.obj  getopt.obj ivy.dll
	$(CC)  $(CFLAGS) -o $@ ivyprobe.obj getopt.obj ivy.lib wsock32.lib $(PCRELIB)

ivyprobe.obj : ivyprobe.c 
	$(CC) -c $(CFLAGS) $(REGEXP) $(PCREINC) ivyprobe.c
	
ivyperf.exe: ivyperf.obj  getopt.obj ivy.dll
	$(CC)  $(CFLAGS) -o $@ ivyperf.obj getopt.obj ivy.lib wsock32.lib $(PCRELIB)

ivyperf.obj : ivyperf.c
	$(CC) -c $(CFLAGS) $(REGEXP) $(PCREINC)  ivyperf.c


ivy-static.lib: $(OBJ)
	del /f $@
	$(LIBTOOL)$@ $(OBJ)

ivy.dll: $(OBJ) 
	$(CC) -nologo /LD  -o $@ $(OBJ) wsock32.lib $(PCRELIB) /link /debug /def:libIvy.def /version:$(MAJOR).$(MINOR)

clean:
	-del /f $(TARGETS) $(TARGETLIBS) *.obj *.a *.dll *.lib *.pdb *~