-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (48 loc) · 1.58 KB
/
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
51
52
53
54
55
56
57
58
59
#This makefile should be used with a Gnu Make compatible
#make program.
#
#When the Gnu Make is not available,simply comment out
#the lines defining the test of OS:
# ifeq ($(OS),Darwin)
# LDFLAGS += -L/opt/local/lib -lusb-1.0
# endif
#
#When running on Mac OS X system, please define the variable
#"OS" with the value "Darwin" by running the command
#"make OS=Darwin"
LIB_AND_APPS_PATH = /home/radek/Desktop/quantis3/Libs-Apps/
QUANTIS_LIB_PATH = $(LIB_AND_APPS_PATH)build/Quantis
QUANTIS_EXT_LIB_PATH = $(LIB_AND_APPS_PATH)build/QuantisExtensions
QUANTIS_INC_PATH = $(LIB_AND_APPS_PATH)Quantis
QUANTIS_EXT_INC_PATH = $(LIB_AND_APPS_PATH)QuantisExtensions
CFLAGS += -I$(QUANTIS_INC_PATH)
CFLAGS += -I$(QUANTIS_EXT_INC_PATH)
CXXFLAGS += -I$(QUANTIS_INC_PATH)
CXXFLAGS += -I$(QUANTIS_EXT_INC_PATH)
LDFLAGS = -lusb-1.0 -L$(QUANTIS_LIB_PATH) -lQuantis `simple2d --libs`
ifeq ($(OS),Darwin)
LDFLAGS += -L/opt/local/lib -lusb-1.0
endif
qrng-sources := \
src/main.cpp \
src/models/qrng_logger.cpp \
src/modules/random_image_renderer.cpp \
src/models/quantum_measurements_set.cpp \
src/models/quantum_measurement.cpp \
src/helpers/probability_helper.cpp \
src/helpers/qrng.cpp \
src/helpers/cast_helper.cpp
qrng-objects := $(qrng-sources:.c=.c.o)
qrng-objects := $(qrng-objects:.cpp=.cpp.o)
all: qrng
qrng: $(qrng-objects)
@echo "--> Linking executable $@"
@$(CXX) -o bin/$@ $(qrng-objects) $(LDFLAGS)
clean:
@rm -rf *.o *~ bin/qrng
%.cpp.o: %.cpp
@echo "-> Building CXX object $@"
@$(CXX) -c $(CXXFLAGS) -o $@ $<
%.c.o: %.c
@echo "-> Building C object $@"
@$(CXX) -c $(CXXFLAGS) -o $@ $<