forked from maxmind/geoip-api-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.vc
84 lines (62 loc) · 1.88 KB
/
Makefile.vc
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
#NMAKE makefile for Windows developers.
#Produces a static library (GeoIP.lib).
#################################################################
# configuration section
################################################################
# place to put the GeoIP.dat database file
# !!! Please keep the 2 \\ as directory separators !!!
#
GEOIPDATADIR="C:\\Windows\\SYSTEM32"
#
# System inc, lib, and bin directories
!ifndef INSTDIR
INSTDIR="C:\GeoIP-1.4.5"
!endif
# Location where GeoIP.lib should be installed my "make install"
INSTALL_LIB=$(INSTDIR)\Lib
#Location where .h files should be installed by "make install".
INSTALL_INC=$(INSTDIR)\Include
#Location where programs should be installed by "make install".
INSTALL_BIN=$(INSTDIR)\Bin
################################################################
# end configuration section
################################################################
DATA_DIR=data
DATA_FILE=GeoIP.dat
LIB_DIR = libGeoIP
TEST_DIR=test
APP_DIR=apps
GEOIP_LIB = GeoIP.lib
APP_PROGRAMS = geoiplookup.exe
TEST_PROGRAMS = benchmark.exe test-geoip.exe
all: GeoIP.lib test_progs app_progs
$(GEOIP_LIB):
cd $(LIB_DIR)
$(MAKE) -nologo -f Makefile.vc GEOIPDATADIR=$(GEOIPDATADIR)
cd ..
test_progs:
cd $(TEST_DIR)
$(MAKE) -nologo -f Makefile.vc
cd ..
app_progs:
cd $(APP_DIR)
$(MAKE) -nologo -f Makefile.vc
cd ..
test: $(GEOIP_LIB) test_progs
cd $(TEST_DIR)
benchmark.exe
test-geoip.exe
cd ..
install: $(GEOIP_LIB) app_progs
cd $(LIB_DIR)
copy $(GEOIP_LIB) $(INSTALL_LIB)
copy *.h $(INSTALL_INC)
cd ..\$(APP_DIR)
copy $(APP_PROGRAMS) $(INSTALL_BIN)
cd ..\$(DATA_DIR)
copy $(DATA_FILE) $(GEOIPDATADIR)
cd ..
clean:
del $(LIB_DIR)\*.obj $(LIB_DIR)\*.lib \
$(APP_DIR)\*.obj $(APP_DIR)\*.exe \
$(TEST_DIR)\*.obj $(TEST_DIR)\*.exe