libtools.make: add rule to build a DLL.
This only works for Windows, so you need to use it on Windows or set CROSS accordingly. Update mkamsboot to make mkamsboot.dll build and link against ucl.dll. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31333 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
71c62c3e1b
commit
84205025c7
2 changed files with 17 additions and 0 deletions
|
@ -98,6 +98,16 @@ lib$(OUTPUT)$(RBARCH): $(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a
|
|||
|
||||
$(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a: $(LIBOBJS) \
|
||||
$(addprefix $(OBJDIR),$(EXTRALIBOBJS))
|
||||
# rules to build a DLL. Only works for W32 as target (i.e. MinGW toolchain)
|
||||
dll: $(OUTPUT).dll
|
||||
$(OUTPUT).dll: $(TARGET_DIR)$(OUTPUT).dll
|
||||
$(TARGET_DIR)$(OUTPUT).dll: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS))
|
||||
@echo DLL $(notdir $@)
|
||||
$(SILENT)mkdir -p $(dir $@)
|
||||
$(SILENT)$(CROSS)$(CC) $(CFLAGS) -shared -o $@ $^ \
|
||||
-Wl,--output-def,$(TARGET_DIR)$(OUTPUT).def
|
||||
|
||||
$(TARGET_DIR)lib$(OUTPUT)$(RBARCH).a: $(LIBOBJS) $(addprefix $(OBJDIR),$(EXTRALIBOBJS))
|
||||
@echo AR $(notdir $@)
|
||||
$(SILENT)mkdir -p $(dir $@)
|
||||
$(SILENT)$(AR) rucs $@ $^
|
||||
|
|
|
@ -22,3 +22,10 @@ include ../libtools.make
|
|||
$(OBJDIR)mkamsboot.o: dualboot.h dualboot.c mkamsboot.c mkamsboot.h
|
||||
$(OBJDIR)main.o: dualboot.h dualboot.c main.c mkamsboot.h
|
||||
|
||||
|
||||
$(TARGET_DIR)$(OUTPUT).dll: EXTRALIBOBJS += $(TARGET_DIR)ucl.dll
|
||||
$(TARGET_DIR)$(OUTPUT).dll: $(TARGET_DIR)ucl.dll
|
||||
$(TARGET_DIR)ucl.dll:
|
||||
$(SILENT)$(MAKE) -C ../../tools/ucl/src/ \
|
||||
BUILD_DIR=$(BUILD_DIR) CC=$(CC) CROSS=$(CROSS) \
|
||||
TARGET_DIR=$(TARGET_DIR)/ ucl.dll
|
||||
|
|
Loading…
Reference in a new issue