-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (38 loc) · 1.03 KB
/
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
####################################
# Automatically generated by SMake #
# /~https://github.com/kala13x/smake #
####################################
CFLAGS = -g -O2 -Wall -D_XUTILS_DEBUG
CFLAGS += -I./src
LIBS = -lxutils -lpthread -lavutil -lavcodec -lavformat -lavdevice -lswscale -lswresample
NAME = libxmedia.a
ODIR = ./build
OBJ = o
OBJS = codec.$(OBJ) \
decoder.$(OBJ) \
encoder.$(OBJ) \
frame.$(OBJ) \
meta.$(OBJ) \
mpegts.$(OBJ) \
nalu.$(OBJ) \
status.$(OBJ) \
stream.$(OBJ) \
version.$(OBJ)
OBJECTS = $(patsubst %,$(ODIR)/%,$(OBJS))
INSTALL_INC = /usr/local/include/xmedia
INSTALL_BIN = /usr/local/lib
VPATH = ./src
.c.$(OBJ):
@test -d $(ODIR) || mkdir -p $(ODIR)
$(CC) $(CFLAGS) -c -o $(ODIR)/$@ $< $(LIBS)
$(NAME):$(OBJS)
$(AR) rcs -o $(ODIR)/$(NAME) $(OBJECTS)
.PHONY: install
install:
@test -d $(INSTALL_BIN) || mkdir -p $(INSTALL_BIN)
install -m 0755 $(ODIR)/$(NAME) $(INSTALL_BIN)/
@test -d $(INSTALL_INC) || mkdir -p $(INSTALL_INC)
cp -r ./src/*.h $(INSTALL_INC)/
.PHONY: clean
clean:
$(RM) $(ODIR)/$(NAME) $(OBJECTS)