source: trunk/src/emx/mklib.smak@ 144

Last change on this file since 144 was 129, checked in by bird, 22 years ago

Fixed (worked around) make dependency issues.

  • Property cvs2svn:cvs-rev set to 1.3
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1# This submakefile is included when a module needs to build a library.
2# For a list of additional variables that can be defined prior to including
3# this submakefile see build.txt.
4
5include common.smak
6
7# The rule for building an archive
8RULES += \
9 $(call FECHO,_@,$$.$(.TARG): $(.OBJS) $(.DEPS))$(NL)\
10 $(call FECHO,_@, $$(DO.LIBRARY))$(NL)
11
12# The rule for building the OMF variant of library from a.out format
13ifneq ($(findstring aout,$(.TKIND)),)
14# Remove the .a suffix from library name
15.TARGET := $(patsubst %$A,%,$(.TARGET))
16# Replace 'aout' with 'omf' in .TKIND
17.TKIND := $(subst aout,omf,$(.TKIND))
18# Compute the new output file directory
19.TKIND.DIR := $(subst $(SPACE),-,$(.TKIND))/
20# Append the .lib suffix to target name
21.TARGET := $(.TARGET)$A
22# Compute the name of target file to build
23.TARG@OMF := $(.TKIND.DIR)$(.TARGET)
24# The rule for building the xxx@omf variant of target
25.PHONY: $(.MODULE)@omf
26MODULES += $(.MODULE)@omf
27DO.INSTALL += $(call CP,$.$(.TARG@OMF),$(INS)$(.INSDIR)$(.TARGET))$(NL)
28.DIRS@OMF := $(dir $.$(.TARG@OMF))
29TARGDIRS += $(.DIRS@OMF)
30$(.MODULE)@omf: $(.MODULE) $(.DIRS@OMF) $.$(.TARG@OMF)
31# bird: Add a dependency rule to help make
32RULES += \
33 $(call FECHO,_@,$.$(.TARG@OMF): $.$(.TARG))$(NL)
34endif # neq ($(findstring aout,$(.TKIND)),)
35
36include comend.smak
Note: See TracBrowser for help on using the repository browser.