mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
70ec5dc0af
commit
0bfe3ca51e
6 changed files with 145 additions and 17 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)$@")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue