# This make file was been written with the EXPRESS requirement that it # exists in the "CsMapDev\EpsgToAsc" directory and that directory is # the current working directory of the make executable which is processing # it; with the original intent being that this makefile would be invoked # by a higher level make file which executes something like the following: # # $(MAKE) /f EpsgToAsc.nmk # # Thus, the current working directory is expected/required to be the EpsgToAsc # sub-directory of the main CS-MAP development directory. That implies that # MAKEDIR is essentially to the full path to that directory. # PRJ_NAME = EpsgToAsc TRG_BASE = EpsgToAsc TRG_EXT = .exe TRG_NAME = $(TRG_BASE)$(TRG_EXT) # # Set the following default values so that this makefile can be used at # this level. Normally, values for these macros are expected to be provided # on the command line by a parent make process. # VERSION = 90 CONFIGURATION = Release PROCESSOR = x64 CSMAP_LIB_NAME = CsMap # # The following definitions are instituted to facilitate building and # testing multiple versions of the test module. That is, placing of object # code, object libraries, and executables in higher level directories distinct # from each other by version, configuration, and processor. The variables # referenced by these definitions are normally expected to be passed from a # parent makefile on the command line invoking this makefile. The default # values set here represent rather generic values which can be useful when in # maintenance/development mode with respect to the test module itself. # SRC_DIR = $(MAKEDIR)\Source OUT_DIR = $(MAKEDIR)\..\bin$(VERSION)\$(CONFIGURATION) LIB_DIR = $(MAKEDIR)\..\lib$(VERSION)\$(CONFIGURATION) INT_DIR = $(MAKEDIR)\..\obj$(VERSION)\$(PRJ_NAME)\$(CONFIGURATION) DICTIONARY_DIR = $(MAKEDIR)\..\Dictionaries # # The following options are chosen to be rather generic; something that # should work in any Windows type environment. More sophisticated # specifications could/should be coded in the parent make file. # CC_FLG = /nologo /I../Include /I.\Include /MD /O2 /W3 /DWIN32 /DNDEBUG /D_WINDOWS /EHsc CPP_FLG = /nologo /I..\Include /I.\Include /MD /O2 /W3 /DWIN32 /DNDEBUG /D_WINDOWS /D__CPP__ /EHsc # # Adjust the above defines for the various processors, currently only # two: x86 (32 bits) and x64 (64 bit x86). # !IF ("$(PROCESSOR)" == "x64") OUT_DIR = $(OUT_DIR)64 INT_DIR = $(INT_DIR)64 LIB_DIR = $(LIB_DIR)64 !ENDIF # # The following define the supporting objects which must be available to # the linker to build the EpsgToAsc executable. Possible candidate for its own # library, but not yet. # # This listing of dependencies needs to be hard coded as NMAKE does not # have much in the way of list manipulation capabilities. So, adding # a new module to this build requires that an entry to this list of object # modules, and an entry to the dependency rules given below, be manually made. # Not much of price to pay given the build speed advantages gained. # TRG_OBJECTS = $(INT_DIR)\crsDefToAsc.obj \ $(INT_DIR)\csEpsgToAsc.obj \ $(INT_DIR)\csToNmMap.obj \ $(INT_DIR)\dtmDefToAsc.obj \ $(INT_DIR)\dtToNmMap.obj \ $(INT_DIR)\elpDefToAsc.obj \ $(INT_DIR)\elToNmMap.obj \ $(INT_DIR)\gxfDefToAsc.obj # # Define the primary targets of this make file. # ALL : $(OUT_DIR)\$(TRG_NAME) # # Since the code and the resulting object codes are desired to # reside in separate directories for many and various reasons, we # need this bit of ugliness to define explicit dependencies. Doing # so enables the encoded "search path batch inference rules" to work, # and when you can get them to work in NAMKE, they work wonderfully. # $(INT_DIR)\EpsgToAsc.obj : $(SRC_DIR)\EpsgToAsc.cpp $(INT_DIR)\csEpsgToAsc.obj : $(SRC_DIR)\csEpsgToAsc.cpp $(INT_DIR)\crsDefToAsc.obj : $(SRC_DIR)\crsDefToAsc.cpp $(INT_DIR)\dtmDefToAsc.obj : $(SRC_DIR)\dtmDefToAsc.cpp $(INT_DIR)\elpDefToAsc.obj : $(SRC_DIR)\elpDefToAsc.cpp $(INT_DIR)\gxfDefToAsc.obj : $(SRC_DIR)\gxfDefToAsc.cpp $(INT_DIR)\csToNmMap.obj : $(SRC_DIR)\csToNmMap.cpp $(INT_DIR)\dtToNmMap.obj : $(SRC_DIR)\dtToNmMap.cpp $(INT_DIR)\elToNmMap.obj : $(SRC_DIR)\elToNmMap.cpp # # Note that there are no plain 'C' modules in this build. Thus this # makefile is somewhat simplified. # {$(SRC_DIR)}.cpp{$(INT_DIR)}.obj:: cl /c /I./Include $(CPP_FLG) /Fo$(INT_DIR)\ $< $(INT_DIR)\$(TRG_BASE).obj : $(SRC_DIR)\$(TRG_BASE).cpp cl /c /I./Include $(CPP_FLG) $(SRC_DIR)\$(TRG_BASE).cpp /Fo$(INT_DIR)\ $< $(OUT_DIR)\$(TRG_NAME) : $(INT_DIR)\$(TRG_BASE).obj $(TRG_OBJECTS) \ $(LIB_DIR)\$(CSMAP_LIB_NAME).lib cl /Fe$(OUT_DIR)\$(TRG_NAME) $(INT_DIR)\$(TRG_BASE).obj \ $(TRG_OBJECTS) \ $(LIB_DIR)\$(CSMAP_LIB_NAME).lib $(LIB_DIR)\$(CSMAP_LIB_NAME).lib : cd $(MAKEDIR)\..\Source $(MAKE) -f Library.nmk "VERSION=$(VERSION)" \ "CONFIGURATION=$(CONFIGURATION)" \ "PROCESSOR=$(PROCESSOR)" \ "CC_FLG=$(CC_FLG)" \ "CPP_FLG=$(CPP_FLG)" cd $(MAKEDIR) clean : del /F $(INT_DIR)\*.obj del /F $(OUT_DIR)\$(TRG_NAME) rebuild: clean $(OUT_DIR)\$(TRG_NAME) # # Create the intermediary and output directories if they don't exist. # $(INT_DIR)\CStest0.obj : $(INT_DIR) $(INT_DIR)\$(TRG_BASE).obj : $(INT_DIR) $(OUT_DIR)\$(TRG_NAME) : $(OUT_DIR) $(INT_DIR) : mkdir $(INT_DIR) $(OUT_DIR) : mkdir $(OUT_DIR)