Merge branch 'release-v4.6.0'
[WPS.git] / ungrib / Makefile
blob626201a77b33bf34d7728d3cd7baa32edee9b835
1 include $(DEV_TOP)/configure.wps
3 ifneq "$(INTERNAL_GRIB2_PATH)" ""
4 GRIB2_DEPS=grib2_libs
5 GRIB2_CLEAN=grib2_clean
6 else
7 GRIB2_DEPS=
8 GRIB2_CLEAN=
9 endif
11 bad_idea:
12 clear
13 @echo ' *************** '
14 @echo " "
15 @echo " "
16 @echo "Go up a directory and type 'compile'"
17 @echo " "
18 @echo " "
19 @echo ' *************** '
21 all: $(GRIB2_DEPS)
22 ( cd src/ngl ; $(MAKE) DEV_TOP="$(DEV_TOP)" CC="$(SCC)" FC="$(SFC)" RANLIB="$(RANLIB)" all )
23 ( cd src ; \
24 if [ "$(COMPILING_ON_CYGWIN_NT)" = yes ] ; then \
25 WRF_DIR2=$(WRF_DIR) ; \
26 else \
27 WRF_DIR2=$(WRF_DIR_PRE)$(WRF_DIR) ; \
28 fi ; \
29 $(MAKE) $(TARGET) \
30 WRF_DIR="$$WRF_DIR2" \
31 FC="$(SFC)" \
32 CC="$(CC)" \
33 CPP="$(CPP)" \
34 FFLAGS="$(FFLAGS)" \
35 CFLAGS="$(CFLAGS)" \
36 LDFLAGS="$(LDFLAGS)" \
37 CPPFLAGS="$(CPPFLAGS) -D_$(CPP_TARGET)" )
38 if [ -h $(TARGET) ] ; then \
39 $(RM) $(TARGET) ; \
40 fi ; \
41 if [ -h ../$(TARGET) ] ; then \
42 $(RM) ../$(TARGET) ; \
43 fi ; \
44 if [ -e src/$(TARGET) ] ; then \
45 $(LN) src/$(TARGET) . ; \
48 grib2_libs:
49 ( cd $(DEV_TOP)/external; $(MAKE) CC=$(SCC) INTERNAL_GRIB2_PATH=$(INTERNAL_GRIB2_PATH) )
51 grib2_clean:
52 ( cd $(DEV_TOP)/external; $(MAKE) clean INTERNAL_GRIB2_PATH=$(INTERNAL_GRIB2_PATH) )
54 clean: $(GRIB2_CLEAN)
55 ( cd src/ngl ; $(MAKE) DEV_TOP="$(DEV_TOP)" clean )
56 if [ -h $(TARGET) ] ; then \
57 $(RM) $(TARGET) ; \
59 if [ -h ../$(TARGET) ] ; then \
60 $(RM) ../$(TARGET) ; \
62 ( cd src ; $(MAKE) clean )
64 superclean: clean