mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-10 15:47:11 +02:00
add some fixes for compiling on mac os x
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@574 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
2a84a73093
commit
35b04af7a8
@ -59,6 +59,7 @@ $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
|
|||||||
# copy binary drivers
|
# copy binary drivers
|
||||||
cp -a $(BUILD_DIR)/wl/*.o $(LINUX_DIR)/drivers/net/wl
|
cp -a $(BUILD_DIR)/wl/*.o $(LINUX_DIR)/drivers/net/wl
|
||||||
cp -a $(BUILD_DIR)/et/*.o $(LINUX_DIR)/drivers/net/et
|
cp -a $(BUILD_DIR)/et/*.o $(LINUX_DIR)/drivers/net/et
|
||||||
|
$(SED) 's/@expr length/@-expr length/' $(LINUX_DIR)/Makefile
|
||||||
touch $(LINUX_DIR)/.patched
|
touch $(LINUX_DIR)/.patched
|
||||||
|
|
||||||
$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
|
$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
|
||||||
|
@ -30,6 +30,7 @@ $(LINUX_HEADERS_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
|
|||||||
linux-$(LINUX_HEADERS_VERSION)/*/*/Config.in \
|
linux-$(LINUX_HEADERS_VERSION)/*/*/Config.in \
|
||||||
linux-$(LINUX_HEADERS_VERSION)/*/Config.in
|
linux-$(LINUX_HEADERS_VERSION)/*/Config.in
|
||||||
ln -sf $(LINUX_HEADERS_DIR)-$(LINUX_HEADERS_VERSION) $(LINUX_HEADERS_DIR)
|
ln -sf $(LINUX_HEADERS_DIR)-$(LINUX_HEADERS_VERSION) $(LINUX_HEADERS_DIR)
|
||||||
|
$(SED) 's/@expr length/@-expr length/' $(LINUX_HEADERS_DIR)/Makefile
|
||||||
touch $(LINUX_HEADERS_DIR)/.unpacked
|
touch $(LINUX_HEADERS_DIR)/.unpacked
|
||||||
|
|
||||||
$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_DIR)/.unpacked
|
$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_DIR)/.unpacked
|
||||||
|
@ -99,11 +99,11 @@ $(STAGING_DIR)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
|
|||||||
DEVEL_PREFIX=/ \
|
DEVEL_PREFIX=/ \
|
||||||
RUNTIME_PREFIX=/ \
|
RUNTIME_PREFIX=/ \
|
||||||
install_dev
|
install_dev
|
||||||
# Build the host utils. Need to add an install target...
|
# Build the host utils. Need to add an install target... - disabled
|
||||||
$(MAKE1) -C $(UCLIBC_DIR)/utils \
|
# $(MAKE1) -C $(UCLIBC_DIR)/utils \
|
||||||
PREFIX=$(STAGING_DIR) \
|
# PREFIX=$(STAGING_DIR) \
|
||||||
HOSTCC="$(HOSTCC)" \
|
# HOSTCC="$(HOSTCC)" \
|
||||||
hostutils
|
# hostutils
|
||||||
touch -c $(STAGING_DIR)/lib/libc.a
|
touch -c $(STAGING_DIR)/lib/libc.a
|
||||||
|
|
||||||
ifneq ($(TARGET_DIR),)
|
ifneq ($(TARGET_DIR),)
|
||||||
|
@ -3,6 +3,11 @@ include $(TOPDIR)/rules.mk
|
|||||||
TARGETS:=sstrip
|
TARGETS:=sstrip
|
||||||
UTILS_BUILD_DIR:=$(TOOL_BUILD_DIR)/utils
|
UTILS_BUILD_DIR:=$(TOOL_BUILD_DIR)/utils
|
||||||
|
|
||||||
|
OS:=$(shell uname)
|
||||||
|
ifeq ($(OS),Darwin)
|
||||||
|
CFLAGS += -I./include
|
||||||
|
endif
|
||||||
|
|
||||||
prepare: $(UTILS_BUILD_DIR)
|
prepare: $(UTILS_BUILD_DIR)
|
||||||
compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS))
|
compile: prepare $(patsubst %,$(UTILS_BUILD_DIR)/%,$(TARGETS))
|
||||||
install: compile
|
install: compile
|
||||||
@ -16,6 +21,6 @@ $(UTILS_BUILD_DIR):
|
|||||||
mkdir -p $(UTILS_BUILD_DIR)
|
mkdir -p $(UTILS_BUILD_DIR)
|
||||||
|
|
||||||
$(UTILS_BUILD_DIR)/%: src/%.c
|
$(UTILS_BUILD_DIR)/%: src/%.c
|
||||||
$(CC) -o $@ $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@)
|
$(CC) $(CFLAGS) -o $@ $(patsubst $(UTILS_BUILD_DIR)/%,src/%.c,$@)
|
||||||
chmod 755 $@
|
chmod 755 $@
|
||||||
|
|
||||||
|
2445
openwrt/toolchain/utils/include/elf.h
Normal file
2445
openwrt/toolchain/utils/include/elf.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -59,6 +59,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <elf.h>
|
#include <elf.h>
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
/**
|
/**
|
||||||
* This seems to work on FreeBSD 5.3, should
|
* This seems to work on FreeBSD 5.3, should
|
||||||
@ -71,10 +72,18 @@
|
|||||||
#define bswap_64 __bswap64
|
#define bswap_64 __bswap64
|
||||||
#define bswap_32 __bswap32
|
#define bswap_32 __bswap32
|
||||||
#define bswap_16 __bswap16
|
#define bswap_16 __bswap16
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
#include <machine/endian.h>
|
||||||
|
#include <machine/byte_order.h>
|
||||||
|
#define __BYTE_ORDER BYTE_ORDER
|
||||||
|
#define __BIG_ENDIAN BIG_ENDIAN
|
||||||
|
#define bswap_16(x) NXSwapShort(x)
|
||||||
|
#define bswap_32(x) NXSwapInt(x)
|
||||||
|
#define bswap_64(x) NXSwapLongLong(x)
|
||||||
#else
|
#else
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#endif /* defined(__FreeBSD__) */
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
|
Loading…
Reference in New Issue
Block a user