-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
45 lines (33 loc) · 999 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
TARGET = libvdpau_odroid.so.1
SRC = device.c presentation_queue.c surface_output.c surface_video.c \
surface_bitmap.c video_mixer.c decoder.c handles.c \
rgba.c gles.c h264_stream.c v4l2.c v4l2decode.c
CFLAGS = -Wall -O3 -g
LDFLAGS =
LIBS = -lrt -lm -lX11 -lGLESv2 -lEGL
CC = gcc
MAKEFLAGS += -rR --no-print-directory
DEP_CFLAGS = -MD -MP -MQ $@
LIB_CFLAGS = -fpic
LIB_LDFLAGS = -shared -Wl,-soname,$(TARGET)
OBJ = $(addsuffix .o,$(basename $(SRC)))
DEP = $(addsuffix .d,$(basename $(SRC)))
MODULEDIR = $(shell pkg-config --variable=moduledir vdpau)
ifeq ($(MODULEDIR),)
MODULEDIR=/usr/lib/vdpau
endif
.PHONY: clean all install
all: $(TARGET)
$(TARGET): $(OBJ)
$(CC) $(LIB_LDFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o $@
clean:
rm -f $(OBJ)
rm -f $(DEP)
rm -f $(TARGET)
install: $(TARGET)
install -D $(TARGET) $(DESTDIR)$(MODULEDIR)/$(TARGET)
uninstall:
rm -f $(DESTDIR)$(MODULEDIR)/$(TARGET)
%.o: %.c
$(CC) $(DEP_CFLAGS) $(LIB_CFLAGS) $(CFLAGS) -c $< -o $@
include $(wildcard $(DEP))