unix, Mac support: Generate order.def via Makefile.
This commit is contained in:
parent
0fd01683c6
commit
63436ce22e
@ -19,7 +19,7 @@ CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
|
|||||||
|
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
ifeq ($(UNAME_S),Darwin)
|
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
|
else
|
||||||
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref
|
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref
|
||||||
endif
|
endif
|
||||||
@ -71,9 +71,16 @@ SRC_C = \
|
|||||||
modos.c \
|
modos.c \
|
||||||
$(SRC_MOD)
|
$(SRC_MOD)
|
||||||
|
|
||||||
# Must be the last file
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
|
# Must be the last file in list of sources
|
||||||
SRC_C += seg_helpers.c
|
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
|
endif
|
||||||
|
|
||||||
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||||
|
@ -1 +0,0 @@
|
|||||||
seg_helpers.o: ___bss_start
|
|
Loading…
x
Reference in New Issue
Block a user