summaryrefslogtreecommitdiffstats
path: root/Makefile.vc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:22:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:22:53 +0000
commit3b149631f0eb732049e04fa0c89d09c7aa2376f9 (patch)
tree7049356b06fcdcdaf9dbae476f55a43942e7c25f /Makefile.vc
parentInitial commit. (diff)
downloadgeoip-3b149631f0eb732049e04fa0c89d09c7aa2376f9.tar.xz
geoip-3b149631f0eb732049e04fa0c89d09c7aa2376f9.zip
Adding upstream version 1.6.12.upstream/1.6.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Makefile.vc')
-rw-r--r--Makefile.vc84
1 files changed, 84 insertions, 0 deletions
diff --git a/Makefile.vc b/Makefile.vc
new file mode 100644
index 0000000..fde3e48
--- /dev/null
+++ b/Makefile.vc
@@ -0,0 +1,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"
+!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 $(LIB_DIR)\*.dll
+ del $(APP_DIR)\*.obj $(APP_DIR)\*.exe
+ del $(TEST_DIR)\*.obj $(TEST_DIR)\*.exe
+