-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (35 loc) · 1.49 KB
/
Makefile
File metadata and controls
49 lines (35 loc) · 1.49 KB
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
46
47
48
49
#Include directory
IDIR=./include
#Includes for mmal
IDIRRPI=/opt/vc/include/
#Compiler
CC=gcc
CFLAGS=-I$(IDIR) -I$(IDIRRPI) -std=gnu11 -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -O3
#Object directory
ODIR=./obj
#Libraries directories
LDIR=./lib
LIBS=-lm /opt/vc/lib/libmmal_vc_client.so /opt/vc/lib/libmmal.so /opt/vc/lib/libmmal_components.so /opt/vc/lib/libmmal_util.so /opt/vc/lib/libmmal_core.so -pthread
#-pg
#dependencies ( headers)
_DEPS=downsampler.h entropic_enc.h frame_encoder.h globals.h imgUtil.h quantizer.h camera_reader.h downsampler_simd.h streamer.h http_api.h file_reader.h
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
#STB_image = ./stb_image/stb_image.h ./stb_image/stb_image_write.h
#objects (files to compile), be careful to add only one file with main
#_OBJ= downsampler.o entropic_enc.o frame_encoder.o imgUtil.o quantizer.o camera_downsampler_test.o camera_reader.o quantizer_tester.o video_encoder.o
_OBJ= downsampler.o downsampler_simd.o entropic_enc.o frame_encoder.o imgUtil.o quantizer.o camera_reader.o video_encoder.o streamer.o http_api.o main.o file_reader.o
#quantizer_tester.o
#OBJ is concat ODIR and object file names
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
#compiling assembly files
$(ODIR)/%.o: %.s $(DEPS) #$(STB_image)
$(CC) -c -o $@ $< $(CFLAGS)
#compiling c files
$(ODIR)/%.o: %.c $(DEPS) #$(STB_image)
$(CC) -c -o $@ $< $(CFLAGS)
#linking to get target executable
lhepi: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
.PHONY: clean
clean:
rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~