forked from Matthias-Wandel/imgcomp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
executable file
·31 lines (22 loc) · 833 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
#-------------------------------------------------------------
# imgcomp makefile for Linux (compile on raspberry pi)
# Matthias Wandel 2015
#-------------------------------------------------------------
OBJ=obj
SRC=src
# with debug:
#CFLAGS:= $(CFLAGS) -O3 -Wall -g
CFLAGS:= $(CFLAGS) -std=c11 -O3 -Wall -D_POSIX_C_SOURCE
all: objdir imgcomp
objdir:
@mkdir -p obj
objs = $(OBJ)/main.o $(OBJ)/config.o $(OBJ)/compare.o $(OBJ)/compare_util.o $(OBJ)/jpeg2mem.o \
$(OBJ)/jpgfile.o $(OBJ)/exif.o $(OBJ)/start_raspistill.o $(OBJ)/util.o $(OBJ)/send_udp.o
$(OBJ)/jpgfile.o $(OBJ)/exif.o $(OBJ)/start_raspistill.o: $(SRC)/jhead.h
$(OBJ)/main.o $(OBJ)/config.o: $(SRC)/config.h
$(OBJ)/%.o:$(SRC)/%.c $(SRC)/imgcomp.h
${CC} $(CFLAGS) -c $< -o $@
imgcomp: $(objs)
${CC} -lm -o imgcomp $(objs) -ljpeg
clean:
rm -f $(objs) imgcomp