forked from fujitsu/crash-gcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (24 loc) · 792 Bytes
/
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
.PHONY: check_crash all default tarball
ifneq ($(TARGET),)
TARGET_OPTION=TARGET="${TARGET}"
endif
CFLAGS="-g -O0"
default: check_crash
@cp ${CRASH}/defs.h src
@make -C src -f ./gcore.mk CFLAGS=${CFLAGS} ${TARGET_OPTION}
gcore_version: src/gcore.mk
GCORE_VERSION=$(shell awk -F = -e '/^VERSION/ {print $$2}' src/gcore.mk)
tarball: gcore_version
@(cp -r ./src ./crash-gcore-command-${GCORE_VERSION}; \
cp ./COPYING ./crash-gcore-command-${GCORE_VERSION}; \
tar zcf crash-gcore-command-${GCORE_VERSION}.tar.gz crash-gcore-command-${GCORE_VERSION}; \
rm -rf ./crash-gcore-command-${GCORE_VERSION})
check_crash:
ifndef CRASH
@echo "Please specify CRASH=<directory>"
@exit 1
endif
clean:
@(rm -f src/defs.h)
@(make -C src -f gcore.mk clean)
@(rm -f crash-gcore-command-*.tar.gz)