summaryrefslogtreecommitdiff
path: root/tools/Makefile.win32
blob: 653a6a8dacf7618d75a366ead869441bb67aed7a (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
PCREINC = -I "..\..\pcre-7.5\\" 
PCRELIB = ..\..\..\pcre\x64\Release\pcre.lib
IVYLIB = ..\ivy.lib
EXTRALIB=
EXTRAINC=-I..

#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 = /W3 /DWIN32 /D_CRT_SECURE_NO_DEPRECATE /nologo
#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 

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

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

all: commands

commands: $(TARGETS)

ivyprobe.exe: ivyprobe.obj getopt.obj $(IVYLIB)
	$(CC)  $(LFLAGS) /Fe$@ ivyprobe.obj getopt.obj $(IVYLIB) wsock32.lib $(PCRELIB) $(EXTRALIB)

ivyprobe.obj : ivyprobe.c 
	$(CC) $(CFLAGS) $(EXTRAINC) $(REGEXP) $(PCREINC) $(EXTRAINC) /c ivyprobe.c

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

ivyperf.exe: ivyperf.obj getopt.obj $(IVYLIB)
	$(CC) $(LFLAGS) /Fe$@ ivyperf.obj getopt.obj $(IVYLIB) wsock32.lib $(PCRELIB) $(EXTRALIB)


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