mirror of
https://github.com/yawut/SDL.git
synced 2026-03-21 17:34:36 -05:00
73 lines
2.0 KiB
Makefile
73 lines
2.0 KiB
Makefile
BASEDIR := $(dir $(firstword $(MAKEFILE_LIST)))
|
|
VPATH := $(BASEDIR)
|
|
|
|
#---------------------------------------------------------------------------------
|
|
# Build options
|
|
#---------------------------------------------------------------------------------
|
|
TARGET = libSDL2.a
|
|
SOURCES = \
|
|
src/*.c \
|
|
src/atomic/*.c \
|
|
src/audio/*.c \
|
|
src/audio/wiiu/*.c \
|
|
src/cpuinfo/*.c \
|
|
src/events/*.c \
|
|
src/file/*.c \
|
|
src/haptic/*.c \
|
|
src/haptic/dummy/*.c \
|
|
src/joystick/*.c \
|
|
src/joystick/wiiu/*.c \
|
|
src/joystick/dummy/*.c \
|
|
src/loadso/dummy/*.c \
|
|
src/power/*.c \
|
|
src/filesystem/dummy/*.c \
|
|
src/render/*.c \
|
|
src/render/wiiu/*.c \
|
|
src/render/software/*.c \
|
|
src/stdlib/*.c \
|
|
src/sensor/*.c \
|
|
src/thread/*.c \
|
|
src/thread/wiiu/*.c \
|
|
src/timer/*.c \
|
|
src/timer/wiiu/*.c \
|
|
src/timer/dummy/*.c \
|
|
src/video/*.c \
|
|
src/video/wiiu/*.c \
|
|
src/video/yuv2rgb/*.c \
|
|
src/video/dummy/*.c
|
|
|
|
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
|
|
INCLUDE = -I./include
|
|
|
|
#---------------------------------------------------------------------------------
|
|
# Compile flags
|
|
#---------------------------------------------------------------------------------
|
|
CFLAGS += -O2 $(INCLUDE)
|
|
CXXFLAGS += -O2 $(INCLUDE)
|
|
|
|
#---------------------------------------------------------------------------------
|
|
# Build rules
|
|
#---------------------------------------------------------------------------------
|
|
.PHONY: clean install
|
|
|
|
$(TARGET): $(OBJECTS)
|
|
|
|
install: $(TARGET)
|
|
@echo INSTALL $(TARGET)
|
|
@mkdir -p $(PORTLIBS)/lib
|
|
@mkdir -p $(PORTLIBS)/include/SDL2
|
|
@cp $(TARGET) $(PORTLIBS)/lib/
|
|
@cp -f ./include/*.h $(PORTLIBS)/include/SDL2/
|
|
|
|
clean:
|
|
@echo CLEAN ...
|
|
@rm -rf $(OBJECTS) $(OBJECTS:.o=.d) $(TARGET)
|
|
|
|
#---------------------------------------------------------------------------------
|
|
# Toolchain
|
|
#---------------------------------------------------------------------------------
|
|
include $(WUT_ROOT)/share/wut.mk
|
|
LDFLAGS += -L$(DEVKITPRO)/portlibs/ppc/lib
|
|
CFLAGS += -I$(DEVKITPRO)/portlibs/ppc/include
|
|
CXXFLAGS += -I$(DEVKITPRO)/portlibs/ppc/include
|