-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathMakefile
72 lines (51 loc) · 1.71 KB
/
Makefile
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
# ======================================================================= #
# ACK CONFIGURATION #
# (Edit this before building) #
# ======================================================================= #
# What platform to build for by default?
DEFAULT_PLATFORM ?= pc86
# Which architectures should get built?
$(if $(PLATS), $(error Don't set PLATS on the command line, because reasons. Edit the Makefile instead.))
PLATS = all
# PLATS = linux386 linuxppc linuxmips
# Where should the ACK put its temporary files?
ifeq ($(TMPDIR),)
ACK_TEMP_DIR ?= /tmp
else
ACK_TEMP_DIR ?= $(TMPDIR)
endif
INSDIR = $(OBJ)/staging
# Where is the ACK going to be installed, eventually? If you don't want to
# install it and just want to run the ACK from the build directory
# ($(TMPDIR)/ack-build/staging, by default), leave this as $(INSDIR).
ifeq ($(OS),Windows_NT)
PREFIX ?= c:/ack
else
PREFIX ?= /opt/pkg/ack
#PREFIX = $(INSDIR)
endif
# What build flags do you want to use for native code?
CFLAGS ?= -g -Os \
-Werror=return-type \
-Werror=implicit-function-declaration \
-Werror=strict-prototypes \
-DUNREACHABLE_CODE='__builtin_unreachable()' \
-DNORETURN=_Noreturn
HOSTCFLAGS = $(CFLAGS)
ACKCFLAGS = -O
LDFLAGS ?= -g
# Various commands.
LUA ?= lua
.PHONY: all
all: +all
# Custom rule to build the installer.
ack-setup.exe: etc/windows-installer.nsi all
makensis -dBUILDDIR="$$(realpath $(INSDIR))" -dOUTFILE="$$(realpath $@)" $<
install: all
@mkdir -p $(PREFIX)
tar cf - -C $(INSDIR) . | tar xvf - -C $(PREFIX)
PLATIND = $(INSDIR)/share/ack
PLATDEP = $(INSDIR)/lib/ack
export PLATS
AB_ENABLE_PROGRESS_INFO = false
include build/ab.mk