forked from dzavalishin/phantomuserland
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mk
executable file
·72 lines (51 loc) · 1.25 KB
/
config.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# $(realpath ) gives good cywgin path in Windows, and, I believe, is
# harmless in Unix.
# add ARCH=arm to local-config.mk to compile for arm
-include $(realpath $(PHANTOM_HOME))/local-config.mk
# Directory where to put executables - supposed to be in PATH
ifndef INST_BIN
INST_BIN=$(realpath c:\bin\tools)
endif
ifndef TFTP_PATH
TFTP_PATH=$(realpath $(PHANTOM_HOME))/run/tftp
endif
BOOT_PATH=$(realpath $(PHANTOM_HOME))/run/fat/boot
ifndef OSTYPE
ifeq ($(OS),Windows_NT)
OSTYPE=cygwin
endif
endif
#all:
#ifeq ($(OSTYPE),cygwin)
# echo Cygwin
#else
#ifeq ($(OSTYPE),linux-gnu)
# echo Linux
#else
# echo Unknown
#endif
#endif
ifndef ARCH
ARCH=ia32
endif
ifndef BOARD
BOARD=$(ARCH)_default
endif
# How to compile phantom source
MKBULK=$(realpath $(PHANTOM_HOME))/build/bin/mkbulk
# Cygwin specific
ifeq ($(OSTYPE),cygwin)
PLC=$(realpath $(PHANTOM_HOME))/build/bin/plc.cmd
else
PLC=$(realpath $(PHANTOM_HOME))/build/bin/plc
endif
# MacOS (Darwin) specific
ifeq "$(shell uname)" "Darwin"
export TARGET_OS_MAC = 1
export CC_DIR = /usr/local/Cellar/llvm/4.0.1/bin
endif
%.pc: %.ph
$(PLC) $<
# Where phantom class files are
PCDIR=$(realpath $(PHANTOM_HOME))/plib/bin
vpath %.pc $(PCDIR)