forked from MaStr/mkPirateBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (47 loc) · 1.37 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
########################################
# Project : PirateBox
#
# Description : This is the main Makefile used for PirateBox
# binaries construction. It mainly build the ipk
# package by tar.gzipping the control and data
# directories.
########################################
# VARIABLES
# ======================================
NAME = piratebox
VERSION = 0.5.2
ARCHITECTURE = all
BINARIES_LOCATION = bin/
SOURCES_LOCATION = src/
IPK = $(NAME)_$(VERSION)_$(ARCHITECTURE).ipk
#
# ======================================
.DEFAULT_GOAL = allclear
# CLEAN
# ======================================
# TARGET : cleanbuild
cleanbuild:
-rm -f $(SOURCES_LOCATION)/control.tar.gz
-rm -f $(SOURCES_LOCATION)/data.tar.gz
# TARGET : clean
clean: cleanbuild
-rm -f $(IPK)
# BUILD
# ======================================
# TARGET SOURCES_LOCATION/control.tar.gz
$(SOURCES_LOCATION)/control.tar.gz:
tar czf $@ -C $(SOURCES_LOCATION)/control .
# TARGET SOURCES_LOCATION/data.tar.gz
$(SOURCES_LOCATION)/data.tar.gz:
tar czf $@ -C $(SOURCES_LOCATION)/data .
# TARGET : IPK
$(IPK): $(SOURCES_LOCATION)/control.tar.gz $(SOURCES_LOCATION)/data.tar.gz
tar czf $@ -C $(SOURCES_LOCATION) control.tar.gz data.tar.gz debian-binary
# TARGET : all
all: $(IPK)
# TARGET : allclear
allclear: all cleanbuild
mv $(IPK) $(BINARIES_LOCATION)
#
# ======================================
.PHONY: allclear all clean