From dd60045670cf71696a9603d0e6a74fdd5d0486e4 Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Wed, 15 Aug 2012 20:35:50 +0200 Subject: [PATCH] add ranlib when generating the .a to the windows compialation --- core/defs.mk | 1 + core/main.mk | 27 +++++++++++++++++++++++++-- core/setup.mk | 2 -- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/core/defs.mk b/core/defs.mk index 73b24b0..957efed 100644 --- a/core/defs.mk +++ b/core/defs.mk @@ -408,6 +408,7 @@ define transform-o-to-static-lib $(call check-pwd-is-top-dir) @rm -f $@ $(Q)$(AR) $(TARGET_GLOBAL_ARFLAGS) $(PRIVATE_ARFLAGS) $@ $(PRIVATE_ALL_OBJECTS) +$(Q)$(RANLIB) $@ endef ############################################################################### diff --git a/core/main.mk b/core/main.mk index 78404c4..f0fff51 100644 --- a/core/main.mk +++ b/core/main.mk @@ -44,8 +44,12 @@ else endif AR ?= $(CROSS)ar LD ?= $(CROSS)ld +AS ?= $(CROSS)as NM ?= $(CROSS)nm STRIP ?= $(CROSS)strip +RANLIB ?= $(CROSS)ranlib +DLLTOOL ?= $(CROSS)dlltool +OBJDUMP ?= $(CROSS)objdump # This is the default target. It must be the first declared target. all: @@ -130,8 +134,27 @@ ifeq ("$(V)","1") $(info list packet=$(shell find $(USER_PACKAGES) -name $(TARGET_OS).mk)) endif -# Get the list of all makefiles available and include them -makefiles += $(shell find $(USER_PACKAGES) -name $(TARGET_OS).mk) +# Get the list of all makefiles available and include them this find the TARGET_OS.mk and the Generic.mk +_moduleFolder = $(shell find $(USER_PACKAGES) -name $(TARGET_OS).mk) +_moduleFolder += $(shell find $(USER_PACKAGES) -name Generic.mk) +# only keep one folder for each makefile found. +_tmpDirectory = $(sort $(dir $(_moduleFolder))) +# this section have all the makefile possible for a specific target, +# this isolate the good makefile for every folder where a makefile present +# for each folder +# check if TARGET_OS.mk is present +# add it +# otherwise +# add generic makefile +$(foreach __makefile,$(_tmpDirectory), \ + $(if $(wildcard $(__makefile)$(TARGET_OS).mk), \ + $(eval makefiles += $(__makefile)$(TARGET_OS).mk) , \ + $(eval makefiles += $(__makefile)Generic.mk) \ + ) \ +) +# import all the makefiles +$(info makefiles="$(makefiles)") + include $(makefiles) diff --git a/core/setup.mk b/core/setup.mk index a86b423..213c478 100644 --- a/core/setup.mk +++ b/core/setup.mk @@ -54,8 +54,6 @@ ifeq ("$(TARGET_OS)","Windows") TARGET_GLOBAL_LDFLAGS += -Wl,-Bstatic endif - i586-mingw32msvc- - else ifeq ("$(TARGET_OS)","Android") TARGET_GLOBAL_CFLAGS += -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ \ -fpic -ffunction-sections -funwind-tables -fstack-protector \