-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
56 lines (44 loc) · 1.19 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
####################################################################
# SEAL makefile
# See LICENSE.md
####################################################################
CXXFLAGS=-O2 -Wall
# DEBUG=0 = disabled
# DEBUG=1 = symbols
# DEBUG=2 = gprof enabled
DEBUG=0
# Which compiler?
CXX=g++
#CXX=musl-gcc
#CXXFLAGS=-std=c++17
ifeq ($(DEBUG),0)
STRIP=strip -x
else
CXXFLAGS += -g
CXXFLAGS += -lefence
endif
ifeq ($(DEBUG),2)
CXXFLAGS += -pg
endif
CXXFLAGS += -Wextra -Wpedantic
INC = -Isrc -I/usr/local/include
LIB = -L/usr/local/lib -static-libgcc -lresolv -lcrypto -lssl -lcurl
EXE = bin/sealtool
# For static linking
#CXXFLAGS += -static
#LIB += -ldl -static-libgcc
all: $(EXE)
clean:
$(RM) -f core $(EXE)
bin/sealtool: src/*.hpp src/*.cpp
@if [ ! -d "bin" ] ; then mkdir bin ; fi
$(CXX) $(CXXFLAGS) $(OPTS) $(INC) -o $@ $^ $(LIB)
@if [ "$(STRIP)" != "" ] ; then $(STRIP) $@ ; fi
# I need libcurl using openssl 3.x
# Ubuntu 20.04 uses openssl with 1.x
libcurl:
rm -rf curl-8.10.1
wget -O curl-8.10.1.tar.gz 'https://curl.se/download/curl-8.10.1.tar.gz'
tar -xzvf curl-8.10.1.tar.gz
(cd curl-8.10.1 ; LDFLAGS=-L/usr/local/lib64 ./configure --with-openssl)
(cd curl-8.10.1 ; make -j 4)