3 |
|
## System specific configuration |
4 |
|
SHELL = /bin/sh |
5 |
|
|
6 |
< |
HOST_CC = gcc |
7 |
< |
HOST_CXX = g++ |
8 |
< |
CC = @CC@ -arch $(ARCH) |
9 |
< |
CXX = @CXX@ -arch $(ARCH) |
6 |
> |
HOST_CC = @CC@ |
7 |
> |
HOST_CXX = @CXX@ |
8 |
> |
CC_PROG = @CC@ |
9 |
> |
CXX_PROG = @CXX@ |
10 |
|
CFLAGS = @CFLAGS@ -g |
11 |
|
CXXFLAGS = @CXXFLAGS@ -g |
12 |
|
CPPFLAGS = @CPPFLAGS@ -I../include -I. -I../uae_cpu |
14 |
|
LDFLAGS = @LDFLAGS@ |
15 |
|
LIBS = @LIBS@ |
16 |
|
MONSRCS = @MONSRCS@ |
17 |
– |
BLESS = @BLESS@ |
17 |
|
LN_S = ln -s |
18 |
|
|
19 |
+ |
## Compilers selection (XXX hackery for 10.2 cross-compilation...) |
20 |
+ |
SDK_VERSION.ppc = @PPC_SDK_VERSION@ |
21 |
+ |
SDK_VERSION = $(SDK_VERSION.$(ARCH)) |
22 |
+ |
ifeq ($(SDK_VERSION), 10.2.8) |
23 |
+ |
CC_PROG = gcc-3.3 |
24 |
+ |
CXX_PROG = g++-3.3 |
25 |
+ |
SDK_ROOT = /Developer/SDKs/MacOSX10.2.8.sdk |
26 |
+ |
CC_ROOT = -F$(SDK_ROOT)/System/Library/Frameworks |
27 |
+ |
LDFLAGS += -Wl,-syslibroot,$(SDK_ROOT) |
28 |
+ |
endif |
29 |
+ |
ifeq ($(SDK_VERSION), 10.3.9) |
30 |
+ |
CC_ROOT = -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3 |
31 |
+ |
endif |
32 |
+ |
ifeq ($(SDK_VERSION), 10.4) |
33 |
+ |
CC_ROOT = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 |
34 |
+ |
endif |
35 |
+ |
CC = $(CC_PROG) $(CC_ROOT) -arch $(ARCH) |
36 |
+ |
CXX = $(CXX_PROG) $(CC_ROOT) -arch $(ARCH) |
37 |
+ |
|
38 |
|
## slirp network emulation code |
39 |
|
WANT_SLIRP = @WANT_SLIRP@ |
40 |
|
ifeq ($(WANT_SLIRP), yes) |
115 |
|
TARGET_ARCHES = @TARGET_ARCHES@ |
116 |
|
PROGS = $(foreach arch, $(TARGET_ARCHES), $(APP).$(arch)) |
117 |
|
|
118 |
+ |
BLESS = $(OBJ_DIR)/lowmem |
119 |
+ |
|
120 |
|
## Rules |
121 |
|
.PHONY: modules install installdirs uninstall mostlyclean clean distclean depend dep |
122 |
|
.SUFFIXES: |
160 |
|
|
161 |
|
links: $(UNIXSRCS) |
162 |
|
|
163 |
< |
$(OBJ_DIR)/$(APP): $(OBJ_DIR) $(GEN_DIR) $(OBJS) |
163 |
> |
$(BLESS): $(OBJ_DIR) $(OBJ_DIR)/lowmem.o |
164 |
> |
$(HOST_CC) -o $@ $(OBJ_DIR)/lowmem.o |
165 |
> |
$(OBJ_DIR)/lowmem.o: ../Unix/Darwin/lowmem.c |
166 |
> |
$(HOST_CC) -o $@ -c $< |
167 |
> |
|
168 |
> |
$(OBJ_DIR)/$(APP): $(OBJ_DIR) $(GEN_DIR) $(OBJS) $(BLESS) |
169 |
|
$(CXX) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) |
170 |
|
$(BLESS) $@ |
171 |
|
|
218 |
|
$(HOST_CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ |
219 |
|
|
220 |
|
$(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.ho |
221 |
< |
$(HOST_CC) $(LDFLAGS) -o $@ $(OBJ_DIR)/build68k.ho |
221 |
> |
$(HOST_CC) -o $@ $(OBJ_DIR)/build68k.ho |
222 |
|
$(OBJ_DIR)/gencpu: $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
223 |
< |
$(HOST_CXX) $(LDFLAGS) -o $@ $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
223 |
> |
$(HOST_CXX) -o $@ $(OBJ_DIR)/gencpu.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
224 |
|
$(OBJ_DIR)/gencomp: $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
225 |
< |
$(HOST_CXX) $(LDFLAGS) -o $@ $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
225 |
> |
$(HOST_CXX) -o $@ $(OBJ_DIR)/gencomp.ho $(OBJ_DIR)/readcpu.ho $(OBJ_DIR)/cpudefs.ho |
226 |
|
|
227 |
|
$(GEN_DIR):: |
228 |
|
@[ -d $(GEN_DIR) ] || mkdir $(GEN_DIR) > /dev/null 2>&1 |