-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (24 loc) · 871 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
# Copyright (c) 2022 RidgeRun,LLC <[email protected]>
# If OpenVX is installed in a non-standard location, set the
# appropriate flags here or via cmdline as
#
# make VX_CFLAGS=-I/path/to/include VX_LDFLAGS=-L/path/to/libs
#
VX_CFLAGS?=
VX_LDFLAGS?=
SOURCES=$(wildcard vx_training_*.c)
SOURCES_CC=$(wildcard vx_training_*.cc)
PROGRAMS=$(patsubst %.c,%,$(SOURCES))
PROGRAMS_CC=$(patsubst %.cc,%,$(SOURCES_CC))
.PHONY: all clean
all: $(PROGRAMS) $(PROGRAMS_CC)
%: %.cc Makefile
@printf "Building $@ from $< - "
@$(CXX) -o $@ $< -g -O0 $(VX_CFLAGS) $(CFLAGS) $(VX_LDFLAGS) $(LD_FLAGS) -lopenvx -lm `pkg-config --cflags --libs opencv4` -std=c++11
@echo " done!"
%: %.c Makefile
@printf "Building $@ from $< - "
@$(CC) -o $@ $< -g -O0 $(VX_CFLAGS) $(CFLAGS) $(VX_LDFLAGS) $(LD_FLAGS) -lopenvx -lm
@echo " done!"
clean:
@rm -f *~ $(PROGRAMS) $(PROGRAMS_CC)