-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (25 loc) · 791 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
# Set the path to your toolchain here
CROSS_COMPILE = /mnt/devel/dafang/Main/toolchain/bin/mips-linux-gnu-
SDK_LIB_DIR = /mnt/devel/dafang/Main/v4l2rtspserver-master/uclibc/
SDK_INC_DIR = /mnt/devel/dafang/Main/v4l2rtspserver-master/inc/
CC = $(CROSS_COMPILE)gcc
CPLUSPLUS = $(CROSS_COMPILE)g++
LD = $(CROSS_COMPILE)ld
AR = $(CROSS_COMPILE)ar cr
STRIP = $(CROSS_COMPILE)strip
CFLAGS = $(INCLUDES) -O2 -Wall -march=mips32r2
CFLAGS += -muclibc
LDFLAG += -muclibc
LDFLAG += -Wl,-gc-sections
INCLUDES = -I$(SDK_INC_DIR)
LIBS=${SDK_LIB_DIR}libimp.so ${SDK_LIB_DIR}libalog.so
all: audioserver
audioserver: AudioServer.o
$(CPLUSPLUS) $(LDFLAG) -o $@ $^ $(LIBS) -lpthread -lm -lrt
$(STRIP) $@
%.o:%.c
$(CC) -c $(CFLAGS) $< -o $@
clean:
rm -f *.o *~
distclean: clean
rm -f $(SAMPLES)