forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
golb.mk
54 lines (45 loc) · 1.33 KB
/
golb.mk
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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += golb
GOLB_VERSION := 1.0
DEB_GOLB_V ?= $(GOLB_VERSION)
golb-setup: setup
-[ ! -e "$(BUILD_SOURCE)/golb-$(GOLB_VERSION).tar.gz" ] \
&& wget -nc -O$(BUILD_SOURCE)/golb-$(GOLB_VERSION).tar.gz \
https://github.com/ProcursusTeam/golb/archive/$(GOLB_VERSION).tar.gz
$(call EXTRACT_TAR,golb-$(GOLB_VERSION).tar.gz,golb-$(GOLB_VERSION),golb)
ifneq ($(wildcard $(BUILD_WORK)/golb/.build_complete),)
golb:
@echo "Using previously built golb."
else
golb: golb-setup
cd $(BUILD_WORK)/golb
mkdir -p $(BUILD_STAGE)/golb/usr/bin
$(CC) $(CFLAGS) \
-framework CoreFoundation \
-framework IOKit \
-lcompression \
$(BUILD_WORK)/golb/key_dumper.c \
-o $(BUILD_STAGE)/golb/usr/bin/key_dumper
$(CC) $(CFLAGS) \
-framework CoreFoundation \
-lcompression \
$(BUILD_WORK)/golb/golb.c \
$(BUILD_WORK)/golb/aes_ap.c \
-o $(BUILD_STAGE)/golb/usr/bin/aes_ap
touch $(BUILD_WORK)/golb/.build_complete
endif
golb-package: golb-stage
# golb.mk Package Structure
rm -rf $(BUILD_DIST)/golb
mkdir -p $(BUILD_DIST)/golb
# golb.mk Prep golb
cp -a $(BUILD_STAGE)/golb/usr $(BUILD_DIST)/golb
# golb.mk Sign
$(call SIGN,golb,tfp0.xml)
# golb.mk Make .debs
$(call PACK,golb,DEB_GOLB_V)
# golb.mk Build cleanup
rm -rf $(BUILD_DIST)/golb
.PHONY: golb golb-package