source: trunk/src/emx/mkomflib.smak@ 1036

Last change on this file since 1036 was 259, checked in by zap, 22 years ago

See changelog.

  • Property cvs2svn:cvs-rev set to 1.4
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1# This submakefile is included from mklib.smak and mkimplib.smak to define
2# the rules required for building an OMF variant from the a.out library.
3
4# The rule for building the OMF variant of library from a.out format
5ifneq ($(findstring aout,$(.TKIND)),)
6
7# Remove the .a suffix from library name and append .lib instead
8.TARGET := $(patsubst %.a,%.lib,$(.TARGET))
9
10# Replace 'aout' with 'omf' in .TKIND
11.TKIND := $(subst aout,omf,$(.TKIND))
12
13# Compute the new output file directory
14.TKIND.DIR := $(subst $(SPACE),-,$(.TKIND))/
15
16# Compute the name of target file to build
17.TARG@OMF := $(.TKIND.DIR)$(.TARGET)
18
19# The rule for building the xxx@omf variant of target
20.PHONY: $(.MODULE)@omf
21
22# Add this module to the list of all modules
23MODULES += $(.MODULE)@omf
24# ... and to the list of libraries
25libs: $(.MODULE)@omf
26
27INS.FILES += $(INS)$(.INSDIR)$(.TARGET)
28$(INS)$(.INSDIR)$(.TARGET): $.$(.TARG@OMF)
29 $(call CP,$<,$@)
30
31.DIRS@OMF := $(dir $.$(.TARG@OMF))
32
33TARGDIRS += $(.DIRS@OMF)
34
35$(.MODULE)@omf: $(.MODULE) $(.DIRS@OMF) $.$(.TARG@OMF)
36
37# Add a dependency rule to help make
38# (avoids that dumb 'dunno how to make' message)
39$.$(.TARG@OMF): $.$(.TARG)
40
41endif # neq ($(findstring aout,$(.TKIND)),)
Note: See TracBrowser for help on using the repository browser.