Rev 227 | Blame | Last modification | View Log | RSS feed
# -*- mode: mak -*-################################################################################ File: PLATFORM/amx.def# Contents: AMX platform defines## Revision History:# 16/08/99 APY Created# 16/11/01 APY Build env +v2.0 support, appended ';' to rules## Note:# The following have to be defined in a platform specific manner# below and come from one of the platform configuration makefiles.## amx_target The name that AMX knows the processor by.# This actually names directory at the root# of the amx directory tree .. nominally one# of `amx68k' or `amx386'.## amx_filesystem The optional name that AMX knows the# filesystem by. This actually names directory# at the root of the amx/fs directory tree ..# nominally one of `afs68k' or `afs386'.## amx_toolset The suffix AMX uses for the build tools# nominally `TOOLWC' or `TOOLMR'.## amx_name The prefix of the name of AMX's configuration# and library files (normally the AMX part number)## amx_fsname The prefix of the name of AMX/FS configuration# and library files (normally the AMX part number)## amx_calling The tail end of the AMX library name.# Unfortunately even though the amx librarys# live in different directorys for different# targets they also have different names.## From the above we define....## amx_dir Root of the amx platform/compiler specific# tree.## amx_cfgdir Configuration## amx_incdir Include directory## amx_objdir Object directory## amx_libdir Library directory################################################################################.PHONY: amxamx:@if [ -z "$(AMX)" ]; then echo 'AMX env var not set'; exit 2; fiamx = $(subst \\,/,$(strip $(AMX)))amx_bin = $(amx)/$(strip $(amx_target))/cfgamx_bin2 = $(amx)/$(strip $(amx_target))/cfgbldwamx_dir = $(amx)/$(strip $(amx_target))/$(strip $(amx_toolset))amx_cfgdir = $(amx_dir)/cfgamx_objdir = $(amx_dir)/objamx_libdir = $(amx_dir)/libamx_incdir = $(amx_dir)/defifdef amx_filesystemamxfs_dir = $(amx)/$(strip $(amx_filesystem))/$(strip $(amx_toolset))amxfs_cfgdir = $(amxfs_dir)/cfgamxfs_objdir = $(amxfs_dir)/objamxfs_libdir = $(amxfs_dir)/libamxfs_incdir = $(amxfs_dir)/defendififeq "$(findstring $(PATH),$(amx))" ""PATH := $(PATH);$(amx_bin);$(amx_bin2)endifTS_MASM_AS = 1#cc_defines += AMX_$(amx_name)cc_includes += $(amx_incdir)as_includes += $(amx_incdir)ld_libpath += $(amx_libdir)ifdef amx_filesystemcc_defines += AMXFS_$(amx_fsname)cc_includes += $(amxfs_incdir)as_includes += $(amxfs_incdir)ld_libpath += $(amxfs_libdir)endifdefine amx_xxx@$(echo) '[Building $@]'@$(cmdfile) -ko$@ '\/* AMX Linker funny stuff,\n\* Force linker ordering requirements of AMX/EP and AMX/ET\n\* whilst allowing main (and the startup code) to be placed\n\* within a the library "eosas".\n\*/\n\extern void main(void);\n\void (*__main__) = main;\n'endefifdef amx_filesystemdefine amx_scf@$(echo) '[Building - Software Config Module $@ "$<"]'@$(amx_name)CG $< $(amx_cfgdir)/$(amx_name)CG.CT $@1 ;@$(amx_name)CG $< $(amxfs_cfgdir)/$(amx_fsname)CG.CT $@2 ;@cat $@1 $@2 > $@; rm $@1 $@2endefelsedefine amx_scf@$(echo) '[Building - Software Config Module $@ "$<"]'@$(amx_name)CG $< $(amx_cfgdir)/$(amx_name)CG.CT $@;endefendifdefine amx_tcf@$(echo) '[Building - Target Config Module $@ "$<"]'@$(amx_name)CG $< $(amx_cfgdir)/$(amx_name)HDW.CT $@;endefdefine amx_pcf@$(echo) '[Building - PC Config Module $@ "$<"]'@$(amx_name)CG $< $(amx_cfgdir)/$(amx_name)PCG.CT $@;endefdefine amx_int@$(echo) '[Building - ISP Module $@ "$<"]'@$(amx_name)CG $< $(amx_cfgdir)/$(amx_name)INT.CT $@;endefdefine amx_icf@$(echo) '[Building - Insight config Module' $@ "$<"]'endef#