-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
31 lines (25 loc) · 1013 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
CPP_STANDARD := c++17
CXXFLAGS := -O3 -fPIC -std=$(CPP_STANDARD)
PREFIX:=.
EMULATOR_EXTRAS := /cvmfs/cms.cern.ch/el8_amd64_gcc11/external/hls4mlEmulatorExtras/1.1.1-6933fcc7cdb4cdd5a649bd6579151d1b/
AP_TYPES := $(EMULATOR_EXTRAS)/include/ap_types
HLS_ROOT := /cvmfs/cms.cern.ch/el8_amd64_gcc11/external/hls/2019.08-fd724004387c2a6770dc3517446d30d9
HLS4ML_INCLUDE := $(EMULATOR_EXTRAS)/include/hls4ml
INCLUDES := -I$(HLS4ML_INCLUDE) -I$(AP_TYPES) -I$(HLS_ROOT)/include
LD_FLAGS := -L$(EMULATOR_EXTRAS)/lib64 -lemulator_interface -ldl
ALL_VERSIONS:=AXOL1TL/AXOL1TL_v3/GTADModel_v3.so
.DEFAULT_GOAL := all
.PHONY: all clean install
all: $(ALL_VERSIONS) main.o
@cp $(ALL_VERSIONS) ./
@echo All OK
install: all
@rm -rf $(PREFIX)/lib64
@mkdir -p $(PREFIX)/lib64
cp GTADModel_*.so $(PREFIX)/lib64
%.so:
$(MAKE) -C $(@D) INCLUDES="$(INCLUDES)" LD_FLAGS="$(LD_FLAGS)" CXXFLAGS="$(CXXFLAGS)"
main.o: main.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $(LD_FLAGS) $< -o $@
clean:
rm GTADModel_*.so main.o $(ALL_VERSIONS)