forked from Semihalf/deku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (30 loc) · 1.02 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
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) Semihalf, 2022
# Author: Marek Maślanka <[email protected]>
.PHONY: deploy
all: mklivepatch elfutils
WORKDIR=
ifdef workdir
WORKDIR=-w $(workdir)
endif
CC ?= gcc
CFLAG ?= -Werror -Wall -Wpedantic -Wextra -Wno-gnu-zero-variadic-macro-arguments
ELFUTILS_FLAGS= $(CFLAG) -lelf
ifdef SUPPORT_DISASSEMBLY
ELFUTILS_FLAGS=-DSUPPORT_DISASSEMBLY -lopcodes
endif
mklivepatch: mklivepatch.c
$(CC) mklivepatch.c $(CFLAG) -lelf -o $@
elfutils: elfutils.c
$(CC) elfutils.c $(ELFUTILS_FLAGS) -o $@
clean:
rm -f mklivepatch elfutils
deploy:
$(warning Using DEKU with "make deploy" is deprecated and will be removed soon. Instead, use the "./deku deploy" command.)
./deku $(WORKDIR) deploy
build:
$(warning Using DEKU with "make build" is deprecated and will be removed soon. Instead, use the "./deku build" command.)
./deku $(WORKDIR) build
sync:
$(warning Using DEKU with "make sync" is deprecated and will be removed soon. Instead, use the "./deku sync" command.)
./deku $(WORKDIR) sync