File: Makefile

package info (click to toggle)
zygrib 8.0.1+dfsg.1-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 189,396 kB
  • ctags: 6,957
  • sloc: cpp: 59,202; makefile: 56
file content (55 lines) | stat: -rw-r--r-- 1,123 bytes parent folder | download
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
QMAKE=/usr/bin/qmake

INSTALLDIR=$(HOME)/zyGrib

MACQTBIN=/opt/local/bin

all: zyGrib

SRC= src/*.h src/*.cpp src/*/*.h src/*/*.cpp 

mac: $(SRC)
	rm -f  ./zyGrib
	rm -fr ./zyGrib.app
	rm -f  src/Makefile
	cd src; $(MACQTBIN)/qmake; make -j5

macclean:
	rm -f  zyGrib
	rm -fr zyGrib.app
	rm -f  src/zyGrib
	rm -f  src/release/zyGrib.exe
	cd src;	$(MACQTBIN)/qmake; make clean

clean:
	rm -f  zyGrib
	rm -fr zyGrib.app
	rm -f  src/zyGrib
	rm -f  src/release/zyGrib.exe
	cd src;	$(QMAKE); make clean

zyGrib: $(SRC)
	@ echo
	rm -f ./zyGrib
	cd src; $(QMAKE); make -j5 LFLAGS=" -Wl,--as-needed"
	@ echo "-----------------------------------"
	@ echo "#!/bin/bash" >> ./zyGrib
	@ echo "cd `pwd`" >> ./zyGrib
	@ echo 'src/zyGrib $$*' >> ./zyGrib
	@ chmod 755 ./zyGrib

install: zyGrib
	mkdir -p $(INSTALLDIR)
	mkdir -p $(INSTALLDIR)/bin
	cp -a data $(INSTALLDIR)
	cp -a grib $(INSTALLDIR)
	rm -f ./zyGrib
	rm -f $(INSTALLDIR)/bin/zyGrib
	cp  -a src/zyGrib $(INSTALLDIR)/bin
	echo "#!/bin/bash" >> ./zyGrib
	echo "cd $(INSTALLDIR)" >> ./zyGrib
	echo 'bin/zyGrib $$*' >> ./zyGrib
	chmod 755 ./zyGrib
	cp -af zyGrib $(INSTALLDIR)