Files
calyp/source/lib/ffmpeg/Makefile
T
2014-02-02 22:50:57 +00:00

25 lines
522 B
Makefile

# Makefile template for shared library
CC = gcc # C compiler
CFLAGS = -fPIC -Wall -Wextra -O2 -g -I../.. # C flags
LDFLAGS = -shared # linking flags
RM = rm -f # rm command
TARGET_LIB = LibAvContextHandle.so # target lib
SRCS = LibAvContextHandle.cpp # source files
OBJS = $(SRCS:.c=.o)
.PHONY: all
all: ${TARGET_LIB}
$(TARGET_LIB): $(OBJS)
$(CC) ${LDFLAGS} -o $@ $^
$(SRCS:.c=.d):%.d:%.cpp
$(CC) $(CFLAGS) -MM $< >$@
include $(SRCS:.c=.d)
.PHONY: clean
clean:
-${RM} ${TARGET_LIB} ${OBJS} $(SRCS:.c=.d)