Check potential non-existent global variables found in the DWARF information
[clinton/Virtual-Jaguar-Rx.git] / jaguarcore.mak
CommitLineData
be44e757
JPM
1#\r
2# Makefile for Virtual Jaguar core library\r
3#\r
4# by James Hammons\r
5# Edited by Jean-Paul Mari\r
6#\r
7# This software is licensed under the GPL v3 or any later version. See the\r
8# file LICENSE file for details. ;-)\r
9#\r
10\r
11ifeq ("$(V)","1")\r
12Q :=\r
13else\r
14Q := @\r
15endif\r
16\r
17# Cross compilation with MXE\r
18#CROSS = i686-pc-mingw32-\r
19\r
20SYSTYPE := __GCCUNIX__\r
21\r
22ifneq "$(CROSS)" ""\r
23SYSTYPE := __GCCWIN32__\r
24else\r
25OSTYPE := $(shell uname -o)\r
26ifeq "$(OSTYPE)" "Msys"\r
27SYSTYPE := __GCCWIN32__\r
28endif\r
29endif\r
30\r
31# Set vars for libcdio\r
32ifneq "$(shell pkg-config --silence-errors --libs libcdio)" ""\r
33HAVECDIO := -DHAVE_LIB_CDIO\r
34CDIOLIB := -lcdio\r
35else\r
36HAVECDIO :=\r
37CDIOLIB :=\r
38endif\r
39\r
40CC := $(CROSS)gcc\r
41LD := $(CROSS)gcc\r
42AR := $(CROSS)ar\r
43ARFLAGS := -rs\r
44\r
45SDL_CFLAGS = `$(CROSS)sdl-config --cflags`\r
46DEFINES = -D$(SYSTYPE)\r
47GCC_DEPS = -MMD\r
48\r
49INCS := -I./src\r
50\r
51OBJS := \\r
52 obj/blitter.o \\r
53 obj/cdintf.o \\r
54 obj/cdrom.o \\r
55 obj/dac.o \\r
56 obj/dsp.o \\r
57 obj/eeprom.o \\r
58 obj/event.o \\r
59 obj/filedb.o \\r
60 obj/gpu.o \\r
61 obj/jagbios.o \\r
62 obj/jagbios2.o \\r
63 obj/jagcdbios.o \\r
64 obj/jagdevcdbios.o \\r
65 obj/jagstub1bios.o \\r
66 obj/jagstub2bios.o \\r
67 obj/jagdasm.o \\r
68 obj/jaguar.o \\r
69 obj/jerry.o \\r
70 obj/joystick.o \\r
71 obj/memory.o \\r
72 obj/memtrack.o \\r
73 obj/mmu.o \\r
25251f31 74 obj/modelsBIOS.o \\r
be44e757
JPM
75 obj/op.o \\r
76 obj/state.o \\r
77 obj/tom.o \\r
78 obj/universalhdr.o \\r
79 obj/wavetable.o\r
80\r
81# Targets for convenience sake, not "real" targets\r
82.PHONY: clean\r
83\r
84all: obj obj/libjaguarcore.a\r
85 @echo "Done!"\r
86\r
87obj:\r
88 @mkdir obj\r
89\r
90# Library rules (might not be cross-platform compatible)\r
91obj/libjaguarcore.a: $(OBJS) \r
92 $(Q)$(AR) $(ARFLAGS) obj/libjaguarcore.a $(OBJS)\r
93\r
94# Main source compilation (implicit rules)...\r
95\r
96obj/%.o: src/%.cpp\r
97 @echo -e "\033[01;33m***\033[00;32m Compiling $<...\033[00m"\r
98 $(Q)$(CC) $(GCC_DEPS) $(CXXFLAGS) $(SDL_CFLAGS) $(DEFINES) $(INCS) -c $< -o $@\r
99\r
100-include obj/*.d\r