2015-06-21 15:33:46 +00:00
|
|
|
# Makefile to build the SDL library
|
|
|
|
|
2023-03-19 12:45:36 +00:00
|
|
|
CPPFLAGS = -I./include
|
|
|
|
CFLAGS = -g -O2
|
2015-06-21 15:33:46 +00:00
|
|
|
AR = ar
|
|
|
|
RANLIB = ranlib
|
|
|
|
|
2021-11-13 18:29:32 +00:00
|
|
|
TARGET = libSDL2.a
|
2021-11-13 22:10:32 +00:00
|
|
|
TESTTARGET = libSDL2_test.a
|
|
|
|
|
2015-06-21 15:33:46 +00:00
|
|
|
SOURCES = \
|
|
|
|
src/*.c \
|
2021-11-13 18:29:32 +00:00
|
|
|
src/atomic/*.c \
|
2015-06-21 15:33:46 +00:00
|
|
|
src/audio/*.c \
|
|
|
|
src/audio/dummy/*.c \
|
|
|
|
src/cpuinfo/*.c \
|
|
|
|
src/events/*.c \
|
|
|
|
src/file/*.c \
|
|
|
|
src/haptic/*.c \
|
|
|
|
src/haptic/dummy/*.c \
|
2021-11-09 07:00:24 +00:00
|
|
|
src/hidapi/*.c \
|
2015-06-21 15:33:46 +00:00
|
|
|
src/joystick/*.c \
|
|
|
|
src/joystick/dummy/*.c \
|
|
|
|
src/loadso/dummy/*.c \
|
|
|
|
src/power/*.c \
|
|
|
|
src/filesystem/dummy/*.c \
|
2021-11-13 17:35:24 +00:00
|
|
|
src/locale/*.c \
|
|
|
|
src/locale/dummy/*.c \
|
|
|
|
src/misc/*.c \
|
|
|
|
src/misc/dummy/*.c \
|
2015-06-21 15:33:46 +00:00
|
|
|
src/render/*.c \
|
|
|
|
src/render/software/*.c \
|
2018-08-21 19:11:34 +00:00
|
|
|
src/sensor/*.c \
|
2018-08-21 20:29:21 +00:00
|
|
|
src/sensor/dummy/*.c \
|
2015-06-21 15:33:46 +00:00
|
|
|
src/stdlib/*.c \
|
2021-11-13 18:29:32 +00:00
|
|
|
src/libm/*.c \
|
2015-06-21 15:33:46 +00:00
|
|
|
src/thread/*.c \
|
|
|
|
src/thread/generic/*.c \
|
|
|
|
src/timer/*.c \
|
|
|
|
src/timer/dummy/*.c \
|
|
|
|
src/video/*.c \
|
2021-11-13 18:29:32 +00:00
|
|
|
src/video/yuv2rgb/*.c \
|
2015-06-21 15:33:46 +00:00
|
|
|
src/video/dummy/*.c \
|
|
|
|
|
2021-11-13 22:10:32 +00:00
|
|
|
TSOURCES = src/test/*.c
|
|
|
|
|
2015-06-21 15:33:46 +00:00
|
|
|
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
2021-11-13 22:10:32 +00:00
|
|
|
TOBJECTS= $(shell echo $(TSOURCES) | sed -e 's,\.c,\.o,g')
|
2015-06-21 15:33:46 +00:00
|
|
|
|
2021-11-13 22:10:32 +00:00
|
|
|
all: $(TARGET) $(TESTTARGET)
|
2015-06-21 15:33:46 +00:00
|
|
|
|
|
|
|
$(TARGET): $(OBJECTS)
|
|
|
|
$(AR) crv $@ $^
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2021-11-13 22:10:32 +00:00
|
|
|
$(TESTTARGET): $(TOBJECTS)
|
|
|
|
$(AR) crv $@ $^
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2015-06-21 15:33:46 +00:00
|
|
|
clean:
|
2021-11-13 22:10:32 +00:00
|
|
|
rm -f $(TARGET) $(TESTTARGET) $(OBJECTS) $(TOBJECTS)
|