|
|
1.1 root 1: # Makefile configuration for Hatari.
2: #
3: # Use of '?=' for assignment allows overriding the given value with
4: # an environment variable, like this:
5: # HOSTCC=my-hostcc make
6: # or:
7: # export HOSTCC=my-hostcc
8: # make
9: #
10: # Following variables can be overridden like that:
11: # CPPFLAGS, LDFLAGS, LIBS, HOSTCC, DATADIR, CONFDIR, BINDIR, MANDIR, DOCDIR
12: #
13: # GNU make itself supports overriding CC like this:
14: # make CC=my-cc
15:
16: # Set the C compiler (e.g. gcc)
17: CC = gcc
18:
19: OPTFLAGS = -O2
20:
21: # Architecture specific settings
22: #
23: # Omap2/ARMv6:
24: # OPTFLAGS += -mfpu=vfp -mfloat-abi=softfp -march=armv6 -finline-limit=64
25: #
26: # Wii/Gekko:
27: # OPTFLAGS = -MMD -MP -MF -O3 -mrvl -mcpu=750 -meabi -mhard-float
28: # CPPFLAGS = -DGEKKO -I$(DEVKITPRO)/libogc/include -I$(DEVKITPRO)/libogc/include/sdl
29: # LDFLAGS = -L$(DEVKITPRO)/libogc/lib/wii -Wl,-Map,hatari.map
30: # LIBS = -lz -lfat -lwiiuse -lbte -lasnd -logc -lm
31:
32: # What warnings to use
33: WARNFLAGS = -Wmissing-prototypes -Wstrict-prototypes -Wsign-compare \
34: -Wbad-function-cast -Wcast-qual -Wpointer-arith \
35: -Wall -Wwrite-strings # -Wshadow -Wcast-align -Werror
36:
37:
38: ifneq ($(MUDFLAP),)
39: # Run-time checks with GCC "mudflap" etc:
40: # - stack protection
41: # - checking of pointer accesses (AFAIK works only on x86)
42: #
43: # Before build, install "libmudflap<version>-<gcc-version>-dev"
44: # package (libmudflap0-4.3-dev in Debian Lenny).
45: #
46: # To build, use:
47: # make clean; make MUDFLAP=1
48: #
49: # To run, use something like (disable sound as it can break things):
50: # MUDFLAP_OPTIONS="-viol-gdb" ./hatari --sound off
51: #
52: # For more info, see (for now, works properly only for x86 gcc):
53: # http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging
54: #
55: RUNCHECKS = -fstack-protector-all -fmudflapth #-fmudflapir
56: LDRUNCHECKS = -fmudflapth -lmudflap
57: endif
58:
59:
60: # Set flags passed to the compiler (e.g. optimization flags)
61: CFLAGS := -g $(WARNFLAGS) $(OPTFLAGS) $(RUNCHECKS)
62:
63: # Set flags passed to the preprocessor (e.g. -I<include dir>)
64: CPPFLAGS ?=
65:
66: # Additional libraries and linker flags:
67: LIBS ?= -lz -lm # -lreadline
68: LDFLAGS ?= $(LDRUNCHECKS)
69:
70: # Ranlib - for generating an index of an archive
71: RANLIB = ranlib
72:
73:
74: # The native C compiler.
75: # This is normally the same as $(CC) unless you are using a cross compiler.
76: HOSTCC ?= $(CC)
77:
78: # Native C compiler flags:
79: HOSTCFLAGS = -g -O -Wall
80:
81: # Native linker flags:
82: HOSTLDFLAGS =
83:
84:
85: # SDL-Library configuration (compiler flags and linker options) - you normally
86: # don't have to change this if you have correctly installed the SDL library!
87: SDL_CFLAGS := $(shell sdl-config --cflags)
88: SDL_LIBS := $(shell sdl-config --libs)
89:
90: # libpng configuration (for PNG format screenshots)
91: PNG_LIBS := $(shell pkg-config --silence-errors --libs libpng)
92: ifneq ($(PNG_LIBS),)
93: PNG_CFLAGS := -DHAVE_LIBPNG=1 $(shell pkg-config --cflags libpng)
94: endif
95:
96: # X11 configuration (for SDL window embedding)
97: X11_LIBS := $(shell pkg-config --silence-errors --libs x11)
98: ifneq ($(X11_LIBS),)
99: X11_CFLAGS := -DHAVE_X11=1 $(shell pkg-config --cflags x11)
100: endif
101:
102: # PORTAUDIO configuration (to support Falcon microphone)
103: PORTAUDIO_LIBS := $(shell pkg-config --silence-errors --libs portaudio-2.0)
104: ifneq ($(PORTAUDIO_LIBS),)
105: PORTAUDIO_CFLAGS := -DHAVE_PORTAUDIO=1 $(shell pkg-config --cflags portaudio-2.0)
106: endif
107:
108: # Here you can define the default data directory for Hatari.
109: # The emulator looks there for the default TOS image etc.
110: # For example you can use the local directory with "." or if you want
111: # a system-wide installation, use something like "/usr/share/hatari".
112: DATADIR ?= .
113:
114: # In this folder, Hatari searches the global configuration file.
115: # /etc or /usr/local/etc is a good place for this.
116: CONFDIR ?= /etc
117:
118: # The executable will be installed in BINDIR
119: #BINDIR ?= /usr/local/bin
120:
121: # The man-page will be install in MANDIR
122: #MANDIR ?= /usr/local/share/man/man1
123:
124: # All other documentation will be installed in DOCDIR
125: #DOCDIR ?= /usr/local/share/doc/hatari
126:
127: # Program used for "make install"
128: #INSTALL = install -c
129: #INSTALL_PROGRAM = $(INSTALL) -s -m 755
130: #INSTALL_SCRIPT = $(INSTALL) -m 755
131: #INSTALL_DATA = $(INSTALL) -m 644
132:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.