# This make file was been written with the EXPRESS requirement that it # exists in the "CsMapDev/Dictionaries" 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) -fCompiler.mak # PRJ_NAME = Compiler TRG_BASE = CS_Comp TRG_EXT = .exe TRG_NAME = $(TRG_BASE)$(TRG_EXT) # # Set the following default values so that this makefile can be used at # this level. Macros defined on the command line take precedence. # VERSION = 90 CONFIGURATION = Release PROCESSOR = x64 CSMAP_LIB_NAME = CsMap # # The following definitions are instituted to facilitate building and # testing multiple versions of the Library. The variables referenced by # these definitions are normally expected to be passed from a parent # makefile. The default values set here represent rather generic values # which can be useful when in maintenance/development mode with respect # to the compiler itself. # OUT_DIR = $(MAKEDIR)\..\bin$(VERSION)\$(CONFIGURATION) LIB_DIR = $(MAKEDIR)\..\lib$(VERSION)\$(CONFIGURATION) INT_DIR = $(MAKEDIR)\..\obj$(VERSION)\$(PRJ_NAME)\$(CONFIGURATION) DICTIONARY_SRC_DIR = $(MAKEDIR)\..\Dictionaries DICTIONARY_TRG_DIR = $(MAKEDIR)\..\Dictionaries INCLUDE_TEST = /t # # We use the following as a generic target which includes all of the # dictionary files. # DICTIONARIES = $(DICTIONARY_TRG_DIR)\Coordsys.CSD \ $(DICTIONARY_TRG_DIR)\Datums.CSD \ $(DICTIONARY_TRG_DIR)\Elipsoid.CSD \ $(DICTIONARY_TRG_DIR)\GeodeticTransform.CSD \ $(DICTIONARY_TRG_DIR)\GeodeticPath.CSD \ $(DICTIONARY_TRG_DIR)\Category.CSD \ $(DICTIONARY_TRG_DIR)\VCoordsys.CSD \ $(DICTIONARY_TRG_DIR)\VDatums.CSD DICTIONARY_SRC = $(DICTIONARY_SRC_DIR)\coordsys.asc \ $(DICTIONARY_SRC_DIR)\datums.asc \ $(DICTIONARY_SRC_DIR)\elipsoid.asc \ $(DICTIONARY_SRC_DIR)\GeodeticTransformation.asc \ $(DICTIONARY_SRC_DIR)\GeodeticPath.asc \ $(DICTIONARY_SRC_DIR)\category.asc \ $(DICTIONARY_SRC_DIR)\vcoordsys.asc \ $(DICTIONARY_SRC_DIR)\vdatums.asc # # The following options are chosen to be rather generic; something that # should work in any Windows type environment. More sophisticated # specifications can/should be coded in the parent make file. # CC_FLG = /nologo /I..\Include /MD /O2 /W4 /EHsc /DWIN32 /DNDEBUG /D_WINDOWS CPP_FLG = /nologo /I..\Include /MD /O2 /W4 /EHsc /DWIN32 /DNDEBUG /D_WINDOWS /D__CPP__ # # 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 # # Define the targets of this make file. # ALL : $(OUT_DIR)\$(TRG_NAME) $(DICTIONARIES) $(INT_DIR)\$(TRG_BASE).obj : $(TRG_BASE).c cl /c $(CC_FLG) /Fo$(INT_DIR)\$(TRG_BASE).obj $(TRG_BASE).c $(OUT_DIR)\$(TRG_NAME) : $(INT_DIR)\$(TRG_BASE).obj $(LIB_DIR)\$(CSMAP_LIB_NAME).lib cl $(CC_FLG) /Fe$(OUT_DIR)\$(TRG_NAME) $(INT_DIR)\$(TRG_BASE).obj $(LIB_DIR)\$(CSMAP_LIB_NAME).lib $(DICTIONARIES) :: $(DICTIONARY_SRC) $(OUT_DIR)\$(TRG_NAME) /b $(INCLUDE_TEST) $(DICTIONARY_SRC_DIR) $(DICTIONARY_TRG_DIR) # # As long as the actual compile functions remain in the Library, it makes # sense to have this dependency rule here. # $(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)" \ Library cd $(MAKEDIR) clean : del /F $(INT_DIR)\*.obj del /F $(OUT_DIR)\$(TRG_NAME) del /F $(DICTIONARIES) rebuild: clean $(OUT_DIR)\$(TRG_NAME) $(DICTIONARIES) # # The following create directories as necessary if they don't already exist. # $(LIB_DIR)\$(CSMAP_LIB_NAME).lib : $(LIB_DIR) $(INT_DIR)\$(TRG_BASE).obj : $(INT_DIR) $(OUT_DIR)\$(TRG_NAME) : $(OUT_DIR) $(LIB_DIR) : mkdir $(LIB_DIR) $(INT_DIR) : mkdir $(INT_DIR) $(OUT_DIR) : mkdir $(OUT_DIR)