2014-08-07 00:17:00 +02:00
|
|
|
NAME= Fplay
|
|
|
|
|
2021-07-08 17:30:46 +02:00
|
|
|
FASM= fasm
|
2014-08-07 00:17:00 +02:00
|
|
|
CC = kos32-gcc
|
|
|
|
AR = kos32-ar
|
|
|
|
LD = kos32-ld
|
|
|
|
CPP= kos32-g++
|
|
|
|
STRIP = kos32-strip
|
|
|
|
|
2016-02-04 22:50:44 +01:00
|
|
|
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -std=c99 -fomit-frame-pointer -mno-ms-bitfields
|
2014-08-07 00:17:00 +02:00
|
|
|
ARFLAG = crs
|
|
|
|
|
|
|
|
SDK_DIR:= $(abspath ../../sdk)
|
|
|
|
LIB_DIR:= $(SDK_DIR)/lib
|
|
|
|
|
2016-02-05 23:15:43 +01:00
|
|
|
INCLUDES= -I. -I$(SDK_DIR)/sources/newlib/libc/include -I$(SDK_DIR)/sources/ffmpeg/ffmpeg-2.8
|
|
|
|
INCLUDES+=-I$(SDK_DIR)/sources/freetype/include -I$(SDK_DIR)/sources/vaapi/libva-1.6.2
|
2014-08-07 00:17:00 +02:00
|
|
|
|
2016-11-03 11:00:13 +01:00
|
|
|
DEFINES= -DDEBUG=1 -D_GNU_SOURCE -DHAVE_VAAPI -DPACKAGE_NAME=\"Fplay-vaapi\"
|
2016-02-01 16:10:02 +01:00
|
|
|
LIBS:= -lavdevice.dll -lavformat.dll -lavcodec.dll -lavutil.dll -lswscale.dll
|
2016-11-03 11:00:13 +01:00
|
|
|
LIBS+= -lswresample.dll -lsound -lpixlib3 -lfreetype.dll -lva.dll -lgcc -lc.dll
|
2014-08-07 00:17:00 +02:00
|
|
|
|
2016-11-03 11:00:13 +01:00
|
|
|
LDFLAGS = -static --subsystem native --stack 0x200000 -Map fplay.map -Tapp-dynamic.lds --image-base 0
|
2014-08-07 00:17:00 +02:00
|
|
|
|
|
|
|
SOURCES = opendial.asm \
|
|
|
|
audio.c \
|
2016-02-05 20:36:09 +01:00
|
|
|
decoder.c \
|
2014-08-07 00:17:00 +02:00
|
|
|
fplay.c \
|
2016-02-04 22:50:44 +01:00
|
|
|
vaapi.c \
|
2014-08-07 00:17:00 +02:00
|
|
|
video.c \
|
2015-07-23 12:13:34 +02:00
|
|
|
utils.c \
|
2014-08-07 00:17:00 +02:00
|
|
|
skin/skin.asm \
|
|
|
|
winlib/button.c \
|
|
|
|
winlib/caption.c \
|
|
|
|
winlib/fontlib.c \
|
|
|
|
winlib/frame.c \
|
|
|
|
winlib/panel.c \
|
|
|
|
winlib/window.c
|
|
|
|
|
|
|
|
OBJECTS = $(patsubst %.asm, %.o, $(patsubst %.c, %.o, $(SOURCES)))
|
|
|
|
|
|
|
|
# targets
|
|
|
|
|
|
|
|
all:$(NAME)
|
|
|
|
|
|
|
|
$(NAME): $(OBJECTS) Makefile
|
2016-11-03 11:00:13 +01:00
|
|
|
$(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
|
2014-08-07 00:17:00 +02:00
|
|
|
kos32-objcopy $@ -O binary
|
|
|
|
|
|
|
|
%.o : %.c Makefile
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
%.o : %.asm Makefile
|
|
|
|
$(FASM) $< $@
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2021-07-08 22:46:48 +02:00
|
|
|
-rm -f $(OBJECTS)
|
2014-08-07 00:17:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|