mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-30 12:05:38 +00:00
Make Makefile compatible with swift5 and older swift versions
This commit is contained in:
@@ -3,10 +3,17 @@
|
||||
SWIFTC = swiftc
|
||||
PREFIX = /usr/local
|
||||
|
||||
SWIFTC_VERS = $(shell swiftc -version | grep -i swift | awk 'match($$0, /[0-9]/) {print substr($$0, RSTART, RLENGTH) }')
|
||||
|
||||
all: doh-logger
|
||||
$(info SWIFTC_VERS="$(SWIFTC_VERS)")
|
||||
|
||||
doh-logger: doh-logger.swift
|
||||
$(SWIFTC) -o $@ -O -static-stdlib $<
|
||||
ifeq ($(SWIFTC_VERS), 5)
|
||||
$(SWIFTC) -o $@ -O $<
|
||||
else
|
||||
$(SWIFTC) -o $@ -O -static-stdlib $<
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -f doh-logger
|
||||
|
||||
Reference in New Issue
Block a user