summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-21 19:56:54 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-21 19:56:54 +0100
commit63436ce22ee20f56b0083f846261c0b77af9961b (patch)
treefb73caf25e92f3d78fcf040e382902273921744d /unix
parent0fd01683c61e039461854b49d1baf8a72aa277fb (diff)
downloadmicropython-63436ce22ee20f56b0083f846261c0b77af9961b.tar.gz
micropython-63436ce22ee20f56b0083f846261c0b77af9961b.zip
unix, Mac support: Generate order.def via Makefile.
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile11
-rw-r--r--unix/order.def1
2 files changed, 9 insertions, 3 deletions
diff --git a/unix/Makefile b/unix/Makefile
index b336892a42..4dcba22e23 100644
--- a/unix/Makefile
+++ b/unix/Makefile
@@ -19,7 +19,7 @@ CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
- LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-map,$@.map,-order_file,order.def
+ LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-map,$@.map,-order_file,$(BUILD)/order.def
else
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref
endif
@@ -71,9 +71,16 @@ SRC_C = \
modos.c \
$(SRC_MOD)
-# Must be the last file
ifeq ($(UNAME_S),Darwin)
+# Must be the last file in list of sources
SRC_C += seg_helpers.c
+
+# making seg_helpers.c rely on order.def will force order.def to be created
+seg_helpers.c: $(BUILD)/order.def
+
+# create order.def in build directory
+$(BUILD)/order.def:
+ $(Q)echo "seg_helpers.o: ___bss_start" > $@
endif
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
diff --git a/unix/order.def b/unix/order.def
deleted file mode 100644
index 34a4fea3e6..0000000000
--- a/unix/order.def
+++ /dev/null
@@ -1 +0,0 @@
-seg_helpers.o: ___bss_start