forked from Stephane-D/SGDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.mk
52 lines (46 loc) · 1.02 KB
/
common.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Common definitions
BIN := $(GDK)/bin
LIB := $(GDK)/lib
SRC_LIB := $(GDK)/src
RES_LIB := $(GDK)/res
INCLUDE_LIB := $(GDK)/inc
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
MAKEFILE_DIR := $(subst \,/,$(MAKEFILE_DIR))
ifeq ($(OS),Windows_NT)
# Native Windows
SHELL := $(BIN)/sh.exe
RM := $(BIN)/rm.exe
CP := $(BIN)/cp.exe
MKDIR := $(BIN)/mkdir.exe
AR := $(BIN)/ar.exe
CC := $(BIN)/gcc.exe
LD:= $(BIN)/ld.exe
NM:= $(BIN)/nm.exe
OBJCPY := $(BIN)/objcopy.exe
ASMZ80 := $(BIN)/sjasm.exe
MACCER := $(BIN)/mac68k.exe
BINTOS := $(BIN)/bintos.exe
LTO_PLUGIN := --plugin=liblto_plugin-0.dll
LIBGCC := $(LIB)/libgcc.a
else
# Native Linux and Docker
PREFIX ?= m68k-elf-
SHELL = sh
RM = rm
CP = cp
MKDIR = mkdir
AR := $(PREFIX)ar
CC := $(PREFIX)gcc
LD := $(PREFIX)ld
NM := $(PREFIX)nm
OBJCPY := $(PREFIX)objcopy
ASMZ80 := sjasm
MACCER := mac68k
BINTOS := bintos
LTO_PLUGIN :=
LIBGCC := -lgcc
endif
JAVA := java
ECHO := echo
SIZEBND := $(JAVA) -jar $(BIN)/sizebnd.jar
RESCOMP := $(JAVA) -jar $(BIN)/rescomp.jar