-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile-default.cnf
executable file
·132 lines (105 loc) · 3.91 KB
/
Makefile-default.cnf
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Makefile configuration for Hatari.
#
# Use of '?=' for assignment allows overriding the given value with
# an environment variable, like this:
# HOSTCC=my-hostcc make
# or:
# export HOSTCC=my-hostcc
# make
#
# Following variables can be overridden like that:
# CPPFLAGS, LDFLAGS, LIBS, HOSTCC, DATADIR, CONFDIR, BINDIR, MANDIR, DOCDIR
#
# GNU make itself supports overriding CC like this:
# make CC=my-cc
# Set the C compiler (e.g. gcc)
CC = gcc
OPTFLAGS = -O2
# Architecture specific settings
#
# Omap2/ARMv6:
# OPTFLAGS += -mfpu=vfp -mfloat-abi=softfp -march=armv6 -finline-limit=64
#
# Wii/Gekko:
# OPTFLAGS = -MMD -MP -MF -O3 -mrvl -mcpu=750 -meabi -mhard-float
# CPPFLAGS = -DGEKKO -I$(DEVKITPRO)/libogc/include -I$(DEVKITPRO)/libogc/include/sdl
# LDFLAGS = -L$(DEVKITPRO)/libogc/lib/wii -Wl,-Map,hatari.map
# LIBS = -lz -lfat -lwiiuse -lbte -lasnd -logc -lm
# What warnings to use
WARNFLAGS = -Wmissing-prototypes -Wstrict-prototypes -Wsign-compare \
-Wbad-function-cast -Wcast-qual -Wpointer-arith \
-Wall -Wwrite-strings # -Wshadow -Wcast-align -Werror
ifneq ($(MUDFLAP),)
# Run-time checks with GCC "mudflap" etc:
# - stack protection
# - checking of pointer accesses (AFAIK works only on x86)
#
# Before build, install "libmudflap<version>-<gcc-version>-dev"
# package (libmudflap0-4.3-dev in Debian Lenny).
#
# To build, use:
# make clean; make MUDFLAP=1
#
# To run, use something like (disable sound as it can break things):
# MUDFLAP_OPTIONS="-viol-gdb" ./hatari --sound off
#
# For more info, see (for now, works properly only for x86 gcc):
# http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging
#
RUNCHECKS = -fstack-protector-all -fmudflapth #-fmudflapir
LDRUNCHECKS = -fmudflapth -lmudflap
endif
# Set flags passed to the compiler (e.g. optimization flags)
CFLAGS := -g $(WARNFLAGS) $(OPTFLAGS) $(RUNCHECKS)
# Set flags passed to the preprocessor (e.g. -I<include dir>)
CPPFLAGS ?=
# Additional libraries and linker flags:
LIBS ?= -lz -lm # -lreadline
LDFLAGS ?= $(LDRUNCHECKS)
# Ranlib - for generating an index of an archive
RANLIB = ranlib
# The native C compiler.
# This is normally the same as $(CC) unless you are using a cross compiler.
HOSTCC ?= $(CC)
# Native C compiler flags:
HOSTCFLAGS = -g -O -Wall
# Native linker flags:
HOSTLDFLAGS =
# SDL-Library configuration (compiler flags and linker options) - you normally
# don't have to change this if you have correctly installed the SDL library!
SDL_CFLAGS := $(shell sdl-config --cflags)
SDL_LIBS := $(shell sdl-config --libs)
# libpng configuration (for PNG format screenshots)
PNG_LIBS := $(shell pkg-config --silence-errors --libs libpng)
ifneq ($(PNG_LIBS),)
PNG_CFLAGS := -DHAVE_LIBPNG=1 $(shell pkg-config --cflags libpng)
endif
# X11 configuration (for SDL window embedding)
X11_LIBS := $(shell pkg-config --silence-errors --libs x11)
ifneq ($(X11_LIBS),)
X11_CFLAGS := -DHAVE_X11=1 $(shell pkg-config --cflags x11)
endif
# PORTAUDIO configuration (to support Falcon microphone)
PORTAUDIO_LIBS := $(shell pkg-config --silence-errors --libs portaudio-2.0)
ifneq ($(PORTAUDIO_LIBS),)
PORTAUDIO_CFLAGS := -DHAVE_PORTAUDIO=1 $(shell pkg-config --cflags portaudio-2.0)
endif
# Here you can define the default data directory for Hatari.
# The emulator looks there for the default TOS image etc.
# For example you can use the local directory with "." or if you want
# a system-wide installation, use something like "/usr/share/hatari".
DATADIR ?= .
# In this folder, Hatari searches the global configuration file.
# /etc or /usr/local/etc is a good place for this.
CONFDIR ?= /etc
# The executable will be installed in BINDIR
#BINDIR ?= /usr/local/bin
# The man-page will be install in MANDIR
#MANDIR ?= /usr/local/share/man/man1
# All other documentation will be installed in DOCDIR
#DOCDIR ?= /usr/local/share/doc/hatari
# Program used for "make install"
#INSTALL = install -c
#INSTALL_PROGRAM = $(INSTALL) -s -m 755
#INSTALL_SCRIPT = $(INSTALL) -m 755
#INSTALL_DATA = $(INSTALL) -m 644