From cd6cce235837a74b252a369bcc40e7b93f91cee4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:31:55 +0200 Subject: Adding upstream version 1.6.12. Signed-off-by: Daniel Baumann --- Makefile.vc | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Makefile.vc (limited to 'Makefile.vc') 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 + -- cgit v1.2.3