1 !INCLUDE ..\win32\common.mak
3 ### Also:- client.exe server.exe
4 sample_apps=sample-client.exe sample-server.exe
5 sample_out=sample-client.pdb sample-server.pdb client.pdb server.pdb
7 server_SOURCES = server.c common.c common.h
8 client_SOURCES = client.c common.c common.h
9 compat_sources = getaddrinfo.c getnameinfo.c
10 sample_client_SOURCES = sample-client.c
11 sample_server_SOURCES = sample-server.c
13 common_objs = common.obj
14 server_objs = server.obj
15 client_objs = client.obj
16 compat_objs = getaddrinfo.obj getnameinfo.obj
17 sample_client_objs = sample-client.obj
18 sample_server_objs = sample-server.obj
20 !IF $(TARGET_WIN_SYSTEM) < 51
21 common_objs = $(common_objs) $(compat_objs)
24 all_objs = $(common_objs) $(server_objs) $(client_objs) $(sample_client_objs) $(sample_server_objs)
25 all_out = $(sample_apps) $(sample_out)
27 DB_FLAGS = /I $(DB_INCLUDE)
28 CPPFLAGS = /I "..\win32\include" /I "." /I "..\include" $(DB_FLAGS) /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL"
29 CPPFLAGS = $(CPPFLAGS) /DNEED_GETOPT
31 !IF $(TARGET_WIN_SYSTEM) >= 51
32 CPPFLAGS = /D TARGET_WIN_SYSTEM=$(TARGET_WIN_SYSTEM) $(CPPFLAGS)
35 SASL_LIB=/libpath:"..\lib" libsasl.lib
37 # EXTRA_LIBS is automatically included into LINK32EXE_FLAGS/LINK32DLL_FLAGS
38 EXTRA_LIBS=$(SASL_LIB)
40 # Where to install files from this directory
41 bindir = $(prefix)\bin
46 # /I flag to xcopy tells to treat the last parameter as directory and create all missing levels
48 # In order to force xcopy not to confirm if the second parameter is file or directory,
49 # the first parameter has to contain a wildcard character. For example, we use libsasl.l*,
50 # instead of libsasl.lib. Ugly, but works!
52 # Note, that we will copy all executabless here, not just $(sample_apps). This is a bug, but it allows
53 # us to copy optionally built executables, which might not be in $(sample_apps). The latter is a feature.
55 install: $(sample_apps)
56 @xcopy *.exe $(bindir) /I /F /Y
58 all-recursive : $(sample_apps)
60 server.exe: $(server_objs) $(common_objs)
61 $(LINK32EXE) @<< $(LINK32EXE_FLAGS) /pdb:"server.pdb" /out:"server.exe" $(server_objs) $(common_objs)
64 client.exe: $(client_objs) $(common_objs)
65 $(LINK32EXE) @<< $(LINK32EXE_FLAGS) /pdb:"client.pdb" /out:"client.exe" $(client_objs) $(common_objs)
68 sample-server.exe: $(sample_server_objs)
69 $(LINK32EXE) @<< $(LINK32EXE_FLAGS) /pdb:"sample-server.pdb" /out:"sample-server.exe" $(sample_server_objs)
72 sample-client.exe: $(sample_client_objs)
73 $(LINK32EXE) @<< $(LINK32EXE_FLAGS) /pdb:"sample-client.pdb" /out:"sample-client.exe" $(sample_client_objs)
76 getaddrinfo.c: ..\lib\getaddrinfo.c
77 copy ..\lib\getaddrinfo.c .
79 getnameinfo.c: ..\lib\getnameinfo.c
80 copy ..\lib\getnameinfo.c .