-
Notifications
You must be signed in to change notification settings - Fork 1
/
CONFIGVARS
117 lines (97 loc) · 2.19 KB
/
CONFIGVARS
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
115
116
#
# cross compiling
#
ifneq (yes,$(M68K_ATARI_MINT_CROSS))
ifeq (no,$(M68K_ATARI_MINT_CROSS))
CROSS = no
else
EVAL_CROSS := case `uname -s` in *MiNT*) echo no;; *) echo yes; esac
CROSS := $(shell $(EVAL_CROSS))
endif
else
CROSS = yes
endif
#
# target and host compiler
#
ifeq ($(CROSS),yes)
CROSSPREFIX=m68k-atari-mint-
LANG=C
NATIVECC = gcc
NATIVECFLAGS = -O -Wall
CRLF = echo crlf -s
GENERAL = $(M68K_ATARI_MINT_CFLAGS) $(M68K_ATARI_MINT_LDFLAGS) -fgnu89-inline
NATIVE_COLDFIRE := 0
else
NATIVE_COLDFIRE := $(shell if uname -s -p | grep 'MiNT.*V4e'; then echo 1; else echo 0; fi)
CROSSPREFIX=
NATIVECC = gcc
NATIVECFLAGS = -O -Wall
CRLF = crlf -s
ifeq ($(NATIVE_COLDFIRE),1)
NATIVECFLAGS += -mcpu=5475
endif
endif
# If you want to use libcmini instead of mintlib
# for a smaller footprint of your TOS executables, call the Makefile with LIBCMINI=yes.
# libcmini must be installed parallel to the freemint top dir for this to work
ifeq (yes,$(LIBCMINI))
LIBCMINI_PATH := $(shell if test -d $(top_srcdir)/../libcmini; then echo '$(top_srcdir)/../libcmini'; elif test -d $(top_srcdir)/libcmini; then echo '$(top_srcdir)/libcmini'; fi)
ifeq (v4e,$(CPU))
LIBCMINI_CPU := m5475
else ifeq (000,$(CPU))
LIBCMINI_CPU := .
else
LIBCMINI_CPU := m68020-60
endif
ifeq (-mshort,$(MSHORT))
LIBCMINI_CPU := $(LIBCMINI_CPU)/mshort
endif
LIBCMINI_INCPATH := $(LIBCMINI_PATH)/include
LIBCMINI_LIBPATH := $(LIBCMINI_PATH)/build/$(LIBCMINI_CPU)
LIBCMINI_STARTUP := $(LIBCMINI_PATH)/build/$(LIBCMINI_CPU)/objs/crt0.o
endif
CC = $(CROSSPREFIX)gcc
AS = $(CC)
AR = $(CROSSPREFIX)ar
RANLIB = $(CROSSPREFIX)ranlib
STRIP = $(CROSSPREFIX)strip
FLAGS = $(CROSSPREFIX)flags
OBJDUMP = $(CROSSPREFIX)objdump
STACK = $(CROSSPREFIX)stack
#
# some tools
#
YACC = bison -dk
LEX = flex
MV = mv
CP = cp
RM = rm -f
TOUCH = touch
MKDIR = mkdir
SED = sed
#
# optimizations
#
OPTS = -O2 -fomit-frame-pointer
#
# warning options
#
WARN = \
-Wall \
-Wmissing-prototypes \
-Wshadow \
-Wpointer-arith \
-Waggregate-return
# -Werror
#
# default definitions
#
DEFINITIONS =
#
# model type
#
MODEL =
.PHONY: printvars
printvars:
@$(foreach V,$(.VARIABLES), $(if $(filter-out environment% default automatic, $(origin $V)),$(warning $V=$($V))))