Skip to content

Commit

Permalink
Merge pull request #644 from PrincetonUniversity/installdir
Browse files Browse the repository at this point in the history
Change the setting of INSTALLDIR.
  • Loading branch information
andrew-appel authored Dec 3, 2022
2 parents cd59622 + 3695860 commit 5390d5e
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,25 @@ FLOCQ= # this mode to use the flocq packaged with Coq or opam
# FLOCQ= -Q $(COMPCERT_INST_DIR)/flocq Flocq # this mode to use the flocq built into compcert

# ##### Configure installation folder #####

ifeq ($(ARCH),x86)
# 1. (if present) the VST installation for reasoning about 64-bit C programs
# on the host architecture will be in $(COQLIB)/user-contrib/VST,
# 2. (if present) the VST installation for reasoning about 32 C programs
# for the 32-bit analogue of the host architecture
# will be in $(COQLIB)/../coq-variant/VST32/VST
# 3. (if present) a VST installation for reasoning about C programs compiled
# for a _different_ architecture will be in
# $(COQLIB)/../coq-variant/VST_otherarch_bitsize/VST
# Not all of this logic is right here in this makefile; some of it is done
# in the CompCert install, in choosing how to configure CompCert itself,
# creating the values of $(ARCH) and $(BITSIZE)
MACHINE_ARCH=$(shell uname -m)
X86_ALIASES:=x86 x86_32 x86_64 i686
ARM_ALIASES:=arm64 aarch64
BOTH_X86=$(and $(filter $(ARCH),$(X86_ALIASES)),$(filter $(MACHINE_ARCH),$(X86_ALIASES)))
BOTH_ARM=$(and $(filter $(ARCH),$(ARM_ALIASES)),$(filter $(MACHINE_ARCH),$(ARM_ALIASES)))
THE_SAME=$(and $(findstring $(ARCH),$(MACHINE_ARCH)),$(findstring $(MACHINE_ARCH),$(ARCH)))

ifneq ($(or $(BOTH_X86),$(BOTH_ARM),$(THE_SAME)),)
ifeq ($(BITSIZE),64)
INSTALLDIR ?= $(COQLIB)/user-contrib/VST
else
Expand Down

0 comments on commit 5390d5e

Please sign in to comment.