diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-14 19:29:53 +0100 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-05-14 19:29:53 +0100 |
commit | 0bfe3ca51ebddbf2cc099fa34f359bd1ac4f65e6 (patch) | |
tree | 55e9fe69186e0c403be34ed30bbcb60416ec617f /rules.mak | |
parent | 70ec5dc0afa5cb4cc0c1fafc844c01973fcde8c3 (diff) |
Constructor support
Allow devices/drivers to register themselves via constructors.
Destructors are not needed (can be registered from a constructor)
and "priority" has been renamed and changed to an enum for clarity.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'rules.mak')
-rw-r--r-- | rules.mak | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -8,10 +8,13 @@ %.o: %.m $(call quiet-command,$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@") -LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)," LINK $(TARGET_DIR)$@") +WAS=-Wl,--whole-archive +WAE=-Wl,--no-whole-archive + +LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(1) $(LIBS) $(WAS) $(ARLIBS) $(WAE)," LINK $(TARGET_DIR)$@") %$(EXESUF): %.o - $(LINK) + $(call LINK,$^) %.a: $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@") |