forked from Hirlam/Monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (38 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
46
47
48
49
50
51
52
53
54
55
56
57
58
ARCH := ecgate
ROOTDIR := $(PWD)
export ARCH ROOTDIR
include $(ROOTDIR)/config/config.$(ARCH)
.DELETE_ON_ERROR:
GLLINK := src rdr mod src
DEFS = verobs
LIBSGL := $(patsubst %,$(ROOTDIR)/$(ARCH)/lib/%.a,$(GLLINK))
default: $(DEFS)
clean:
-$(RM) -rf $(ARCH)
-$(RM) -rf bin
GLLIBS := mod rdr src
$(GLLIBS): depf90mod.x ./$(ARCH)/lib
test -d $(ARCH)/$@ || $(MKDIR) $(ARCH)/$@
$(MAKE) -C $(ARCH)/$@ -f $(ROOTDIR)/makegl.mk ARCH=$(ARCH) TOROOT=.. $@
prg : depf90mod.x ./$(ARCH)/lib mod
test -d $(ARCH)/$@ || $(MKDIR) $(ARCH)/$@
$(MAKE) -C $(ARCH)/$@ -f $(ROOTDIR)/makegl.mk ARCH=$(ARCH) TOROOT=.. $@
.PHONY : $(GLLIBS) $(CMALIBS) prg
verobs: $(GLLIBS) ./$(ARCH)/prg
$(MAKE) -C $(ARCH)/prg -f $(ROOTDIR)/makeexe.mk LIBS="$(LIBSGL)" LD="$(LD)" DEPS="$+" $@
# MISC tasks
./$(ARCH):
test -d $@ || $(MKDIR) $@
./$(ARCH)/bin: ./$(ARCH)
test -d $@ || $(MKDIR) $@
./$(ARCH)/lib: ./$(ARCH)
test -d $@ || $(MKDIR) $@
./$(ARCH)/prg: ./$(ARCH) ./$(ARCH)/bin
test -d $@ || $(MKDIR) $@
-ln -sf ./$(ARCH)/bin .
depf90mod.x: ./$(ARCH)/bin
$(MAKE) -C tools -f Makefile ARCH=$(ARCH) ROOTDIR=$(ROOTDIR) $(ROOTDIR)/$(ARCH)/bin/depf90mod.x
install:
install -D $(ROOTDIR)/$(ARCH)/bin/verobs $(DESTDIR)/bin/verobs
uninstall:
rm -f $(DESTDIR)/bin/verobs