-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (57 loc) · 1.48 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
65
66
QMAKE=/usr/bin/qmake
INSTALLDIR=$(HOME)/zyGrib
MACQTBIN=/usr/local/Qt-5.3.2/bin/
QWTDIR=src/qwt-6.1.3
all: zyGrib
SRC= src/*.h src/*.cpp src/*/*.h src/*/*.cpp \
src/qwt*/src/*.cpp src/qwt*/src/*.h
mac: $(SRC)
rm -f ./zyGrib
rm -fr ./zyGrib.app
rm -f src/Makefile
cd src/g2clib; make -f makefile.osx
cd $(QWTDIR)/src; $(MACQTBIN)/qmake; make -j6
cd src; $(MACQTBIN)/qmake; make -j6
macclean:
rm -f zyGrib
rm -fr zyGrib.app
rm -f src/zyGrib
rm -f src/release/zyGrib.exe
rm -f $(QWTDIR)/lib/*
cd $(QWTDIR)/src; $(MACQTBIN)/qmake; make clean
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
veryclean: clean
rm -f $(QWTDIR)/lib/*
cd $(QWTDIR)/src; $(QMAKE); make clean
rm -f src/g2clib/libg2c.a
rm -f src/g2clib/*.o
zyGrib: $(SRC)
@ echo
rm -f ./zyGrib
cd $(QWTDIR)/src; $(QMAKE); make -j6
cd src/g2clib; make
cd src; $(QMAKE); make -j6
@ 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)