summaryrefslogtreecommitdiff
path: root/security/beidconnect/files/patch-linux_Makefile
blob: 3c440a9d1113b891cb73ec75324f160cb2b56eff (plain) (blame)
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
--- linux/Makefile.orig	2025-04-28 10:25:57 UTC
+++ linux/Makefile
@@ -1,16 +1,19 @@
+CFLAGS ?= -O2
+CXXFLAGS ?= -O2
 PLDFLAGS = $(shell pkg-config --libs libpcsclite)
 PCFLAGS = $(shell pkg-config --cflags libpcsclite)
+PREFIX ?= /usr
 beidconnect: debughelper.o asn1.o BEIDCard.o CardFactory.o CardReader.o CertChainRequestHandler.o comm.o hash.o log.o main.o native.o ReaderList.o Request.o RequestHandler.o SCard.o SignRequestHandler.o UserCertsRequestHandler.o util.o VersionRequestHandler.o VirtualCard.o VirtualReader.o x509Util.o crypto.o setup.o test.o IDRequestHandler.o
 	$(CXX) $^ $(PLDFLAGS) $(LDFLAGS) -o $@
 
 %.o: ../common/%.cpp
-	$(CXX) -c -O2 -std=gnu++11 $(CXXFLAGS) $(PCFLAGS) -fPIE -I../common -o $@ $<
+	$(CXX) -c -std=gnu++11 $(CXXFLAGS) $(PCFLAGS) -fPIE -I../common -o $@ $<
 %.o: ../common/%.c
-	$(CC) -c -O2 -std=gnu99 $(CFLAGS) $(PCFLAGS) -fPIE -I../common -o $@ $<
+	$(CC) -c -std=gnu99 $(CFLAGS) $(PCFLAGS) -fPIE -I../common -o $@ $<
 
 install:
-	install -d $(DESTDIR)/usr/bin
-	install -m 755 beidconnect $(DESTDIR)/usr/bin/
+	install -d $(DESTDIR)$(PREFIX)/bin
+	install -m 755 beidconnect $(DESTDIR)$(PREFIX)/bin/
 
 clean:
 	rm -f *.o beidconnect