-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 955 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
33
34
35
36
37
38
39
TARNAME = barnsley_farn# chose a name for tar archive
HOST = localhost# host name of receiving operating system
USER = chaka# username on receiving operating system
PORT = 2222# port to use, should stay 2222
all:
@echo "This is a dummy to prevent running make without explicit target!"
clean: remove_tarfile remove_srcfiles
rm -f barnsley_farn
pack: clean
tar -czf $(TARNAME).tar.gz src/ Makefile
unpack:
mkdir $(TARNAME)
tar -zxvf $(TARNAME).tar.gz -C $(TARNAME)
rm Makefile $(TARNAME).tar.gz
cd $(TARNAME)
send: pack
scp -P $(PORT) $(TARNAME).tar.gz $(USER)@$(HOST):~/
compile: clean
mkdir -p src/build/
cd src/build/ && cmake -DCMAKE_BUILD_TYPE=Release ..
$(MAKE) -C src/build/
mv src/build/barnsley_fern barnsley_fern
remove_tarfile:
rm -f $(TARNAME).tar.gz
remove_srcfiles:
rm -rf src/.idea
rm -rf src/build
rm -rf src/cmake-build-debug
# to extract Makefile to be able to unpack files
# tar -zxvf ($TARNAME).tar.gz Makefile