mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 01:55:38 +00:00
6d01ffcd94
CFLAGS currently takes care of two aspects of the build: optimisation and debug symbols on one hand, the include path on the other. The former should be overridable by users, the latter shouldn't. This patch moves the include path flag to CPPFLAGS, which is appropriate for pre-processor directives. This leaves CFLAGS with only overridable flags. Based on a patch by Roflcopter4: https://github.com/joncampbell123/dosbox-x/pull/3850 Signed-off-by: Stephen Kitt <steve@sk2.org>
62 lines
1.1 KiB
Makefile
62 lines
1.1 KiB
Makefile
# Makefile to build the SDL library
|
|
|
|
CPPFLAGS = -I./include
|
|
CFLAGS = -g -O2
|
|
AR = ar
|
|
RANLIB = ranlib
|
|
|
|
TARGET = libSDL2.a
|
|
TESTTARGET = libSDL2_test.a
|
|
|
|
SOURCES = \
|
|
src/*.c \
|
|
src/atomic/*.c \
|
|
src/audio/*.c \
|
|
src/audio/dummy/*.c \
|
|
src/cpuinfo/*.c \
|
|
src/events/*.c \
|
|
src/file/*.c \
|
|
src/haptic/*.c \
|
|
src/haptic/dummy/*.c \
|
|
src/hidapi/*.c \
|
|
src/joystick/*.c \
|
|
src/joystick/dummy/*.c \
|
|
src/loadso/dummy/*.c \
|
|
src/power/*.c \
|
|
src/filesystem/dummy/*.c \
|
|
src/locale/*.c \
|
|
src/locale/dummy/*.c \
|
|
src/misc/*.c \
|
|
src/misc/dummy/*.c \
|
|
src/render/*.c \
|
|
src/render/software/*.c \
|
|
src/sensor/*.c \
|
|
src/sensor/dummy/*.c \
|
|
src/stdlib/*.c \
|
|
src/libm/*.c \
|
|
src/thread/*.c \
|
|
src/thread/generic/*.c \
|
|
src/timer/*.c \
|
|
src/timer/dummy/*.c \
|
|
src/video/*.c \
|
|
src/video/yuv2rgb/*.c \
|
|
src/video/dummy/*.c \
|
|
|
|
TSOURCES = src/test/*.c
|
|
|
|
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
|
TOBJECTS= $(shell echo $(TSOURCES) | sed -e 's,\.c,\.o,g')
|
|
|
|
all: $(TARGET) $(TESTTARGET)
|
|
|
|
$(TARGET): $(OBJECTS)
|
|
$(AR) crv $@ $^
|
|
$(RANLIB) $@
|
|
|
|
$(TESTTARGET): $(TOBJECTS)
|
|
$(AR) crv $@ $^
|
|
$(RANLIB) $@
|
|
|
|
clean:
|
|
rm -f $(TARGET) $(TESTTARGET) $(OBJECTS) $(TOBJECTS)
|