This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
/
autoconf.mk.in
107 lines (95 loc) · 3.47 KB
/
autoconf.mk.in
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# BANNERSTART
# - Copyright 2006-2008, Galois, Inc.
# - This software is distributed under a standard, three-clause BSD license.
# - Please see the file LICENSE, distributed with this software, for specific
# - terms and conditions.
# Author: Adam Wick <[email protected]>
# BANNEREND
HaLVM_VERSION := @PACKAGE_VERSION@
GIT_LIB_URL := git://github.com/GaloisInc
INTEGER_LIBRARY := @INTEGER_LIBRARY@
BUILD_DOCS := @ENABLE_DOCS@
ABI := @ABI@
# Top of the build system, set by auto[re]conf. This allows any other makefile
# to include common.mk and get a consistent variable environment.
TOPDIR := @abs_top_builddir@
prefix := @prefix@
exec_prefix := @exec_prefix@
bindir := @bindir@
libdir := @libdir@
incdir := @includedir@
halvmlibdir := $(libdir)/HaLVM-$(HaLVM_VERSION)
platformdir := @PLATFORMDIR@
#
# External programs of interest
#
ALEX := @ALEX@
AR := @AR@
AUTORECONF := @AUTORECONF@
CABAL := @CABAL@
CC := @CC@
CHMOD := @CHMOD@
CP := @CP@
CPP := @CPP@
CURL := @CURL@
ECHO := @ECHO@
FIND := @FIND@
GHC := @GHC@
GIT := @GIT@
HADDOCK := @HADDOCK@
HAPPY := @HAPPY@
HSCOLOUR := @HSCOLOUR@
INSTALL := @INSTALL@
LD := @LD@
LN := @LN@
MAKE := @MAKE@
MKDIR := @MKDIR@
MV := @MV@
NM := @NM@
OBJDUMP := @OBJDUMP@
PATCH := @PATCH@
PERL := @PERL@
RANLIB := @RANLIB@
RM := @RM@
SED := @SED@
TAR := @TAR@
TOUCH := @TOUCH@
HSC2HS := @HSC2HS@
#
# Interesting flags from configure
#
NO_UNIT_AT_A_TIME_OPT := @NO_UNIT_AT_A_TIME_OPT@
NO_STACK_PROT_OPT := @NO_STACK_PROT_OPT@
NO_FRAME_PTR_OPT := @NO_FRAME_PTR_OPT@
NO_ASYNC_UNWIND_OPT := @NO_ASYNC_UNWIND_OPT@
NO_RED_ZONE_OPT := @NO_RED_ZONE_OPT@
NO_BUILTIN_OPT := @NO_BUILTIN_OPT@
XENSTORE_H_OPT := @XENSTORE_H_OPT@
ARCH_OPT := @ARCH_OPTION@
ARCH := @ARCHITECTURE@
XEN_INCLUDE_DIR := @XEN_INCLUDE_DIRECTORY@
XEN_LIBRARY_DIR := @XEN_LIBRARY_DIRECTORY@
FORCE_PLATFORM_GHC := @FORCE_PLATFORM_GHC@
PACKAGE_TARGET := @PACKAGE_TARGET@
#
# Derivations of the above.
#
BUILD_ARCH := $(ARCH)-unknown-linux
HOST_ARCH := $(BUILD_ARCH)
TARGET_ARCH := $(ARCH)-unknown-HaLVM
ARCH_CC_FLAGS := $(NO_UNIT_AT_A_TIME_OPT)
ARCH_CC_FLAGS += $(NO_STACK_PROT_OPT)
ARCH_CC_FLAGS += $(NO_FRAME_PTR_OPT)
ARCH_CC_FLAGS += $(NO_ASYNC_UNWIND_OPT)
ARCH_CC_FLAGS += $(NO_RED_ZONE_OPT)
ARCH_CC_FLAGS += $(NO_BUILTIN_OPT)
ARCH_CC_FLAGS += $(XENSTORE_H_OPT)
ARCH_CC_FLAGS += $(ARCH_OPT)
ARCH_GHC_FLAGS := $(foreach f,$(ARCH_CC_FLAGS),-optc$f)
ARCH_GHC_FLAGS += $(ARCH_OPT)
CFLAGS := -O2 -Wall -Wno-unused-variable
CFLAGS += -I$(XEN_INCLUDE_DIR)
CFLAGS += $(ARCH_CC_FLAGS)
LDFLAGS := -L$(XEN_LIBRARY_DIR)
GHCFLAGS := -O2 -H32m
GHCFLAGS += $(ARCH_GHC_FLAGS)