forked from libsdl-org/SDL-1.2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.dolce
79 lines (67 loc) · 1.73 KB
/
Makefile.dolce
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
# Makefile to build the SDL library
INCLUDE = -I./include
CFLAGS = -Ofast -mcpu=cortex-a9 -mfpu=neon -fgraphite-identity -floop-nest-optimize -flto=jobserver -ffat-lto-objects \
$(INCLUDE) -lSceLibc_stub -Werror \
-Dmemcpy=sceClibMemcpy -Dmemset=sceClibMemset -Dmemmove=sceClibMemmove -Dmemcmp=sceClibMemcmp
HW_FLAGS = -DVITA_HW_ACCEL
ifeq ($(VITA_HW_ACCEL),0)
HW_FLAGS =
else
ifeq ($(VITA_BLIT_HW),0)
HW_FLAGS += -DVITA_BLIT_HW=0
else
HW_FLAGS += -DVITA_BLIT_HW=1
endif
ifeq ($(VITA_BLIT_HW_A),0)
HW_FLAGS += -DVITA_BLIT_HW_A=0
else
HW_FLAGS += -DVITA_BLIT_HW_A=1
endif
ifeq ($(VITA_FILL_HW),0)
HW_FLAGS += -DVITA_FILL_HW=0
else
HW_FLAGS += -DVITA_FILL_HW=1
endif
endif
CFLAGS += $(HW_FLAGS)
CC = arm-dolce-eabi-gcc
AR = arm-dolce-eabi-gcc-ar
RANLIB = arm-dolce-eabi-gcc-ranlib
CONFIG_H = include/SDL_config.h
TARGET = libSDL.a
SOURCES = \
src/*.c \
src/audio/*.c \
src/cdrom/*.c \
src/cpuinfo/*.c \
src/events/*.c \
src/file/*.c \
src/joystick/*.c \
src/stdlib/*.c \
src/thread/*.c \
src/timer/*.c \
src/video/*.c \
src/audio/vita/*.c \
src/video/vita/*.c \
src/joystick/vita/*.c \
src/cdrom/dummy/*.c \
src/thread/vita/*.c \
src/timer/vita/*.c \
src/loadso/dummy/*.c \
src/video/arm/*.S \
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g; s,\.S,\.o,g')
$(TARGET): $(CONFIG_H) $(OBJECTS)
$(AR) crv $@ $^
$(RANLIB) $@
$(CONFIG_H):
cp $(CONFIG_H).default $(CONFIG_H)
clean:
rm -f $(TARGET) $(OBJECTS)
rm $(CONFIG_H)
install: $(TARGET)
@mkdir -p "$(DESTDIR)$(DOLCESDK)/arm-dolce-eabi/lib"
@cp $(TARGET) $(DESTDIR)$(DOLCESDK)/arm-dolce-eabi/lib
@mkdir -p "$(DESTDIR)$(DOLCESDK)/arm-dolce-eabi/include/SDL"
@cp include/*.h "$(DESTDIR)$(DOLCESDK)/arm-dolce-eabi/include/SDL"
@echo "Installed!"
.PHONY: clean install $(CONFIG_H)