forked from beejjorgensen/bgnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (39 loc) · 1.24 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
PACKAGE=bgnet
[email protected]:~/beej.us/guide/$(PACKAGE)
BUILDDIR=./stage
BUILDTMP=./build_tmp
.PHONY: all
all:
$(MAKE) -C src
.PHONY: stage
stage:
mkdir -p $(BUILDDIR)/{pdf,html,translations,examples}
cp -v website/* website/.htaccess $(BUILDDIR)
cp -v src/bgnet*.pdf $(BUILDDIR)/pdf
cp -v src/bgnet.html $(BUILDDIR)/html/index.html
cp -v src/bgnet-wide.html $(BUILDDIR)/html/index-wide.html
cp -v src/{cs,dataencap}.svg $(BUILDDIR)/html/
cp -v translations/*.{pdf,html} $(BUILDDIR)/translations 2>/dev/null || :
cp -v examples/*.c $(BUILDDIR)/examples
cp -v examples/{Makefile,README.md} $(BUILDDIR)/examples
mkdir -p $(BUILDTMP)/bgnet_examples
cp -v examples/{Makefile,README.md} examples/*.c $(BUILDTMP)/bgnet_examples
( cd $(BUILDTMP); zip -r bgnet_examples.zip bgnet_examples )
cp -v $(BUILDTMP)/bgnet_examples.zip $(BUILDDIR)/examples
rm -rf $(BUILDTMP)
.PHONY: upload
upload: pristine all stage
rsync -rv -e ssh --delete ${BUILDDIR}/* $(UPLOADDIR)
.PHONY: fastupload
fastupload: all stage
rsync -rv -e ssh --delete ${BUILDDIR}/* $(UPLOADDIR)
.PHONY: pristine
pristine: clean
$(MAKE) -C src $@
$(MAKE) -C examples $@
rm -rf $(BUILDDIR)
.PHONY: clean
clean:
rm -rf
$(MAKE) -C src $@
$(MAKE) -C examples $@