-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.cfg
114 lines (94 loc) · 3.95 KB
/
Makefile.cfg
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# dcload-ip Makefile Configuration
# Uncomment this if using KOS
USING_KOS_GCC = 1
# Detect the host
ROOTDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
include $(ROOTDIR)/Makefile.hostdetect
# Host compiler and flags
HOSTCC = gcc
HOSTCFLAGS = -O2 -I/usr/local/include
HOSTLDFLAGS = -L/usr/local/lib
# For MinGW/MSYS, MinGW-w64/MSYS2 and Cygwin
ifdef WINDOWS
HOSTCFLAGS += -D_WIN32
EXECUTABLEEXTENSION = .exe
endif
# dc compiler prefix -- this is usually what you used for --prefix when
# building your compiler. Note: BINTARGETPREFIX is just binutils.
ifdef USING_KOS_GCC
# Use these for GCC 4.x (for KOS)
TARGETPREFIX = /opt/toolchains/dc/sh-elf
BINTARGETPREFIX = $(TARGETPREFIX)
else
# This is for portable sh4-elf-gcc GCC 9.2.0
TARGETPREFIX = /mnt/c/DreamcastKOS/gcc-sh4
BINTARGETPREFIX = /mnt/c/DreamcastKOS/binutils-sh4
endif
# dir to install dc-tool in
TOOLINSTALLDIR = /opt/toolchains/dc/bin
# To build dc-tool, we need to use libelf or libfd
# By default, libelf is used
# Define this if you want to use libbfd instead of libelf (which is default)
WITH_BFD = 0
# For MinGW/MSYS, we need to use libbfd instead of libelf
ifdef MINGW
WITH_BFD = 1
endif
# You may have to change the paths for BFDLIB and BFDINCLUDE to the correct
# ones for your system. These must point to your sh-elf bfd, not the system one!
# If you built the dc-chain with the v0.4, you'll have it installed in the
# correct location.
BFDLIB = $(TARGETPREFIX)/lib
BFDINCLUDE = $(TARGETPREFIX)/include
# When using libelf instead of BFD, these must point to your
# libelf installation (leave empty or undefined if libelf is part of the system)
ELFLIB = $(TARGETPREFIX)/lib
ELFINCLUDE = $(TARGETPREFIX)/include
# For macOS, libelf is here when installed through Homebrew
ifdef MACOS
ELFINCLUDE = /usr/local/include/libelf
endif
# sh-elf-stuff
# You don't need to change these
ifdef USING_KOS_GCC
# Use these for GCC 4.x (for KOS)
TARGETCC = $(TARGETPREFIX)/bin/sh-elf-gcc
TARGETCFLAGS = -Os -ml -m4-single-only
TARGETOBJCOPY = $(BINTARGETPREFIX)/bin/sh-elf-objcopy -R .stack
TARGETLD = $(BINTARGETPREFIX)/bin/sh-elf-ld
else
# This is for portable sh4-elf-gcc GCC 9.2.0
TARGETCC = $(TARGETPREFIX)/bin/sh4-elf-gcc
TARGETCFLAGS = -O2 -ml -m4-single-only -Wpedantic -Wno-address-of-packed-member
TARGETOBJCOPY = $(BINTARGETPREFIX)/bin/sh4-elf-objcopy -R .stack
TARGETLD = $(BINTARGETPREFIX)/bin/sh4-elf-ld
endif
# set TARGETCCVER to 3 or 4, depending on your SH compiler version (gcc 3.x or gcc 4.x)
# this line tries to detect the version automatically
#TARGETCCVER = $(shell $(TARGETCC) --version | head -1 | sed "s/.* \([[:digit:]][[:digit:]]*\)\.[[:digit:]][[:digit:]]*.*/\1/")
TARGETCCVER = 4
# You generally shouldn't change this unless you are making forked
# versions (or test versions)
VERSION = 1.0.5
# Define this if you want a standalone, statically linked, no dependency binary
# This is on by default for MinGW/MSYS
#STANDALONE_BINARY = 1
# On a laptop and dc-tool's got your fans running too high?
# Enable this. It will slow dc-tool's network console down a teeny bit, but it'll
# drastically reduce CPU usage. Not necessary if on something like an 8-core desktop.
# Set to 1 to enable, 0 to disable.
SAVE_MY_FANS = 0
#
# IMPORTANT IP ADDRESS INFORMATION:
#
# Note that with the addition of DHCP, each octet here must be 3 numbers long.
# That means use leading zeroes like this when specifying an IP address:
# 192.168.001.058 or 010.000.076.002, etc. Prior versions of this program could
# not handle addresses like 192.168.0.x, and the fix for that means leading
# zeroes are now required when specifying an IP address below.
#
# Any IP in the 0.0.0.0/8 range, meaning 000.xxx.xxx.xxx, will enable DHCP mode.
# If in doubt, just use 000.000.000.000. Some routers may not accept other IPs.
#
# The IP of your dreamcast - set to 169.254.xxx.xxx if you want to use arp on pc
DREAMCAST_IP = 000.000.000.000