-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile.linux
More file actions
41 lines (28 loc) · 1.02 KB
/
Makefile.linux
File metadata and controls
41 lines (28 loc) · 1.02 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
all:
cmake -B build . $(if $(D),-DCMAKE_BUILD_TYPE=Debug,-DCMAKE_BUILD_TYPE=Release) $(CMAKEARGS)
$(MAKE) -C build $(if $(V),VERBOSE=1)
MYPRJ=.
LDFLAGS+=-g
CFLAGS+=-g -Wall -std=c++1z -D_NO_RAPI -DUSE_STD_REGEX
itslib=$(MYPRJ)/itslib
CFLAGS+=-I $(itslib)/include
CFLAGS+=-I /usr/local/include
regutils=$(MYPRJ)/registryutils
CFLAGS+=-I $(regutils)
hvtool: hvtool.o stringutils.o vectorutils.o debug.o regfileparser.o regvalue.o
$(CXX) -o $@ $^ $(LDFLAGS)
# find a suitable openssl dir
sslv=$(firstword $(wildcard $(addsuffix /include/openssl/opensslv.h,/usr/local /opt/local $(wildcard /usr/local/opt/openssl*) /usr)))
dirname=$(dir $(patsubst %/,%,$1))
openssl=$(call dirname,$(call dirname,$(call dirname,$(sslv))))
CFLAGS+=-I $(openssl)/include
LDFLAGS+=-L$(openssl)/lib -lcrypto
%.o: %.cpp
$(CXX) -c -o $@ $^ $(CFLAGS)
%.o: $(itslib)/src/%.cpp
$(CXX) -c -o $@ $^ $(CFLAGS)
%.o: $(regutils)/%.cpp
$(CXX) -c -o $@ $^ $(CFLAGS)
clean:
$(RM) hvtool $(wildcard *.o)
$(RM) -r build CMakeFiles CMakeCache.txt CMakeOutput.log