-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (34 loc) · 822 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
CC = gcc
#CC = clang
CXX = g++
#CXX = clang++
INCLUDES = ./
CFLAGS = -O3 -fopenmp -Wall -Wno-parentheses
#CFLAGS += -g -Wall -Wno-parenthese
CFLAGS += -I$(INCLUDES)
#CFLAGS += -DDEBUG
CPPFLAGS = $(CFLAGS) -std=c++14
CPPFLAGS += `pkg-config opencv --cflags`
LDFLAGS += `pkg-config opencv --libs`
LDFLAGS += -lboost_system
#LDFLAGS += -lboost_filesystem
LDFLAGS += -lusb-1.0
CSRCS =
CPPSRCS = main.cpp spectrometer.cpp
OBJS = $(CSRCS:.c=.o) $(CPPSRCS:.cpp=.o)
TARGET = a.out
.PHONY: depend clean
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) -o $(TARGET) $(OBJS) $(LDFLAGS)
%.o: %.cpp
$(CXX) $(CPPFLAGS) -o $@ -c $<
clean:
$(RM) $(OBJS) $(EXTRAS) $(TARGET)
distclean: clean
$(RM) *~ .depend
depend: .depend
.depend: $(CSRCS) $(CPPSRCS)
$(RM) ./.depend
$(CXX) $(CPPFLAGS) -MM $^ >> ./.depend
include .depend