core: Fix libdwarf and Qt build failure
[clinton/Virtual-Jaguar-Rx.git] / jaguarcore.mak
... / ...
CommitLineData
1#\r
2# Makefile for Virtual Jaguar core library\r
3#\r
4# by James Hammons\r
5# Modified 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
46QT_CFLAGS = -fPIC -I/usr/include/qt5 -I/usr/include/qt5/QtOpenGL -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore\r
47DEFINES = -D$(SYSTYPE)\r
48GCC_DEPS = -MMD\r
49\r
50INCS := -I./src\r
51\r
52OBJS := \\r
53 obj/blitter.o \\r
54 obj/cdintf.o \\r
55 obj/cdrom.o \\r
56 obj/dac.o \\r
57 obj/dsp.o \\r
58 obj/eeprom.o \\r
59 obj/event.o \\r
60 obj/filedb.o \\r
61 obj/gpu.o \\r
62 obj/jagbios.o \\r
63 obj/jagbios2.o \\r
64 obj/jagcdbios.o \\r
65 obj/jagdevcdbios.o \\r
66 obj/jagstub1bios.o \\r
67 obj/jagstub2bios.o \\r
68 obj/jagdasm.o \\r
69 obj/jaguar.o \\r
70 obj/jerry.o \\r
71 obj/joystick.o \\r
72 obj/memory.o \\r
73 obj/memtrack.o \\r
74 obj/mmu.o \\r
75 obj/modelsBIOS.o \\r
76 obj/op.o \\r
77 obj/state.o \\r
78 obj/tom.o \\r
79 obj/universalhdr.o \\r
80 obj/wavetable.o\r
81\r
82# Targets for convenience sake, not "real" targets\r
83.PHONY: clean\r
84\r
85all: obj obj/libjaguarcore.a\r
86 @echo "Done!"\r
87\r
88obj:\r
89 @mkdir obj\r
90\r
91# Library rules (might not be cross-platform compatible)\r
92obj/libjaguarcore.a: $(OBJS) \r
93 $(Q)$(AR) $(ARFLAGS) obj/libjaguarcore.a $(OBJS)\r
94\r
95# Main source compilation (implicit rules)...\r
96\r
97obj/%.o: src/%.cpp\r
98 @echo -e "\033[01;33m***\033[00;32m Compiling $<...\033[00m"\r
99 $(Q)$(CC) $(GCC_DEPS) $(CXXFLAGS) $(SDL_CFLAGS) $(QT_CFLAGS) $(DEFINES) $(INCS) -c $< -o $@\r
100\r
101-include obj/*.d\r