# This submakefile is included from mklib.smak and mkimplib.smak to define # the rules required for building an OMF variant from the a.out library. # The rule for building the OMF variant of library from a.out format ifneq ($(findstring aout,$(.TKIND)),) # Remove the .a suffix from library name .TARGET := $(patsubst %.a,%,$(.TARGET)) # Replace 'aout' with 'omf' in .TKIND .TKIND := $(subst aout,omf,$(.TKIND)) # Compute the new output file directory .TKIND.DIR := $(subst $(SPACE),-,$(.TKIND))/ # Append the .lib suffix to target name .TARGET := $(.TARGET).lib # Compute the name of target file to build .TARG@OMF := $(.TKIND.DIR)$(.TARGET) # The rule for building the xxx@omf variant of target .PHONY: $(.MODULE)@omf MODULES += $(.MODULE)@omf DO.INSTALL += $(call CP,$.$(.TARG@OMF),$(INS)$(.INSDIR)$(.TARGET))$(NL) .DIRS@OMF := $(dir $.$(.TARG@OMF)) TARGDIRS += $(.DIRS@OMF) $(.MODULE)@omf: $(.MODULE) $(.DIRS@OMF) $.$(.TARG@OMF) # Add a dependency rule to help make # (avoids that dumb 'dunno how to make' message) RULES += $(call FECHO,_@,$.$(.TARG@OMF): $.$(.TARG))$(NL) endif # neq ($(findstring aout,$(.TKIND)),)