Some improvements to Linux build scripts.
This commit is contained in:
parent
27461a5d0d
commit
391621d601
16
Makefile
16
Makefile
@ -4,7 +4,7 @@ SHELL := bash
|
||||
# FLAGS
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
MACHINE := $(shell gcc -dumpmachine)
|
||||
MACHINE := $(shell $(CC) -dumpmachine)
|
||||
ifeq ($(MACHINE),$(filter x86_64-%,$(MACHINE)))
|
||||
MYCPU := x64
|
||||
MARCH := x86-64
|
||||
@ -43,14 +43,14 @@ endif
|
||||
all: keygen sign verify
|
||||
|
||||
keygen: subdirs src/.magic.h rsrc
|
||||
gcc $(CFLAGS) $(LDFLAGS) -o bin/codesign_keygen$(SUFFIX) src/codesign_keygen.c src/common.c obj/version_keygen.o $(LIBS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/codesign_keygen$(SUFFIX) src/codesign_keygen.c src/common.c obj/version_keygen.o $(LIBS)
|
||||
|
||||
sign: subdirs src/.magic.h
|
||||
gcc $(CFLAGS) $(LDFLAGS) -o bin/codesign_sign$(SUFFIX) src/codesign_sign.c src/common.c obj/version_sign.o $(LIBS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o bin/codesign_sign$(SUFFIX) src/codesign_sign.c src/common.c obj/version_sign.o $(LIBS)
|
||||
|
||||
verify: subdirs src/.magic.h rsrc
|
||||
gcc $(CFLAGS) -UEMBED_PUBKEY $(LDFLAGS) -o bin/codesign_verify$(SUFFIX) src/codesign_verify.c src/common.c obj/version_verify.o $(LIBS)
|
||||
gcc $(CFLAGS) -DEMBED_PUBKEY $(LDFLAGS) -o bin/codesign_verifz$(SUFFIX) src/codesign_verify.c src/common.c obj/version_verify.o $(LIBS)
|
||||
$(CC) $(CFLAGS) -UEMBED_PUBKEY $(LDFLAGS) -o bin/codesign_verify$(SUFFIX) src/codesign_verify.c src/common.c obj/version_verify.o $(LIBS)
|
||||
$(CC) $(CFLAGS) -DEMBED_PUBKEY $(LDFLAGS) -o bin/codesign_verifz$(SUFFIX) src/codesign_verify.c src/common.c obj/version_verify.o $(LIBS)
|
||||
|
||||
src/.magic.h:
|
||||
str=$$(tr -dc '0-9A-F' < /dev/urandom | head -c 26); \
|
||||
@ -67,9 +67,9 @@ ifeq ($(MACHINE),$(filter %-mingw32,$(MACHINE)))
|
||||
windres -DAPP="Signer ($(MYCPU))" -DNAME=sign -o obj/version_sign.o res/version.rc
|
||||
windres -DAPP="Verifier ($(MYCPU))" -DNAME=verify -o obj/version_verify.o res/version.rc
|
||||
else
|
||||
gcc -o obj/version_keygen.o -xc -c - < /dev/null
|
||||
gcc -o obj/version_sign.o -xc -c - < /dev/null
|
||||
gcc -o obj/version_verify.o -xc -c - < /dev/null
|
||||
$(CC) -o obj/version_keygen.o -xc -c - < /dev/null
|
||||
$(CC) -o obj/version_sign.o -xc -c - < /dev/null
|
||||
$(CC) -o obj/version_verify.o -xc -c - < /dev/null
|
||||
endif
|
||||
|
||||
subdirs: deps/$(MYCPU)/lib/libcrypto.a deps/$(MYCPU)/lib/libssl.a
|
||||
|
2
deps/build-openssl-linux.sh
vendored
2
deps/build-openssl-linux.sh
vendored
@ -6,7 +6,7 @@ trap 'read -p "Press any key..." x' EXIT
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Set up compiler
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
case "$(cc -dumpmachine)" in
|
||||
case "$(${CC:-cc} -dumpmachine)" in
|
||||
i686-*)
|
||||
readonly MY_CPU=x86
|
||||
readonly MY_MARCH=i486
|
||||
|
Loading…
Reference in New Issue
Block a user