########################################################################### # # win32 makefile -- search4j # Copyright (C) 2008 DL Consulting Ltd # # A component of the Greenstone digital library software # from the New Zealand Digital Library Project at the # University of Waikato, New Zealand. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ########################################################################### AR = lib CC = cl LINKER = link DEBUG = 0 GSDL_VC4 = 0 !IF $(DEBUG) CXXFLAGS = -DEBUG -Z7 /errorReport:prompt LDFLAGS = -DEBUG -Z7 /errorReport:prompt !ELSE CXXFLAGS = LDFLAGS = !ENDIF !IF $(GSDL_VC4) CXXFLAGS = $(CXXFLAGS) -GX !ELSE CXXFLAGS = $(CXXFLAGS) -EHsc !ENDIF !IF !DEFINED(BINDIR) BINDIR = bin !ENDIF DEFS = -D_CRT_SECURE_NO_DEPRECATE INCLUDES = LIBS = advapi32.lib COMPILE = $(CC) -c /DWINDOWS $(CXXFLAGS) $(DEFS) $(INCLUDES) LINK = $(LINKER) /OUT:$@ $(LDFLAGS) .SUFFIXES: .SUFFIXES: .cpp .obj .cpp.obj: $(COMPILE) $< SOURCES = libsearch4j.cpp search4j.cpp OBJECTS = libsearch4j.obj search4j.obj EXECUTABLE_OBJECTS = $(OBJECTS) EXECUTABLE = search4j.exe all: $(EXECUTABLE) install search4j.exe: $(EXECUTABLE_OBJECTS) $(LINK) $(LIBS) $(EXECUTABLE_OBJECTS) clean: del $(OBJECTS) del $(EXECUTABLE) install: $(EXECUTABLE) IF NOT EXIST "$(BINDIR)\.." mkdir "$(BINDIR)\.." IF NOT EXIST "$(BINDIR)" mkdir "$(BINDIR)" copy $(EXECUTABLE) "$(BINDIR)"