Subversion Repositories Kolibri OS

Rev

Rev 6150 | Rev 9025 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5021 Serge 1
NAME= Fplay
2
 
3
FASM= fasm.exe
4
CC = kos32-gcc
5
AR = kos32-ar
6
LD = kos32-ld
7
CPP= kos32-g++
8
STRIP = kos32-strip
9
 
6140 serge 10
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -std=c99 -fomit-frame-pointer  -mno-ms-bitfields
5021 Serge 11
ARFLAG = crs
12
 
13
SDK_DIR:= $(abspath ../../sdk)
14
LIB_DIR:= $(SDK_DIR)/lib
15
 
6150 serge 16
INCLUDES= -I. -I$(SDK_DIR)/sources/newlib/libc/include -I$(SDK_DIR)/sources/ffmpeg/ffmpeg-2.8
17
INCLUDES+=-I$(SDK_DIR)/sources/freetype/include -I$(SDK_DIR)/sources/vaapi/libva-1.6.2
5021 Serge 18
 
6658 serge 19
DEFINES= -DDEBUG=1 -D_GNU_SOURCE -DHAVE_VAAPI -DPACKAGE_NAME=\"Fplay-vaapi\"
6117 serge 20
LIBS:= -lavdevice.dll -lavformat.dll -lavcodec.dll -lavutil.dll -lswscale.dll
6658 serge 21
LIBS+= -lswresample.dll -lsound -lpixlib3 -lfreetype.dll -lva.dll -lgcc -lc.dll
5021 Serge 22
 
6658 serge 23
LDFLAGS = -static --subsystem native --stack 0x200000 -Map fplay.map -Tapp-dynamic.lds --image-base 0
5021 Serge 24
 
25
SOURCES = 	opendial.asm			\
26
		audio.c				\
6144 serge 27
		decoder.c			\
5021 Serge 28
		fplay.c				\
6140 serge 29
		vaapi.c				\
5603 serge 30
		video.c				\
5021 Serge 31
		utils.c				\
32
		skin/skin.asm			\
33
		winlib/button.c			\
34
		winlib/caption.c		\
35
		winlib/fontlib.c		\
36
		winlib/frame.c			\
37
		winlib/panel.c			\
38
		winlib/window.c
39
 
40
OBJECTS =  $(patsubst %.asm, %.o, $(patsubst %.c, %.o, $(SOURCES)))
41
 
42
# targets
43
 
44
all:$(NAME)
45
 
46
$(NAME): $(OBJECTS) Makefile
6658 serge 47
	$(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
5021 Serge 48
	kos32-objcopy $@ -O binary
49
 
50
%.o : %.c Makefile
51
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
52
 
53
%.o : %.asm Makefile
54
	$(FASM) $< $@
55
 
56
 
57
clean:
58
	-rm -f *.o
59
 
60
 
61