Create a directory for EEPROMs if it doesn't already exist
[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
74 obj/op.o \\r
75 obj/state.o \\r
76 obj/tom.o \\r
77 obj/universalhdr.o \\r
78 obj/wavetable.o\r
79\r
80# Targets for convenience sake, not "real" targets\r
81.PHONY: clean\r
82\r
83all: obj obj/libjaguarcore.a\r
84 @echo "Done!"\r
85\r
86obj:\r
87 @mkdir obj\r
88\r
89# Library rules (might not be cross-platform compatible)\r
90obj/libjaguarcore.a: $(OBJS) \r
91 $(Q)$(AR) $(ARFLAGS) obj/libjaguarcore.a $(OBJS)\r
92\r
93# Main source compilation (implicit rules)...\r
94\r
95obj/%.o: src/%.cpp\r
96 @echo -e "\033[01;33m***\033[00;32m Compiling $<...\033[00m"\r
97 $(Q)$(CC) $(GCC_DEPS) $(CXXFLAGS) $(SDL_CFLAGS) $(DEFINES) $(INCS) -c $< -o $@\r
98\r
99-include obj/*.d\r