view libcruft/Makerules.in @ 3238:041ea33fbbf4

[project @ 1999-03-26 17:48:16 by jwe]
author jwe
date Fri, 26 Mar 1999 17:48:35 +0000
parents cf74b8097212
children a2b3a1413d28
line wrap: on
line source

# @configure_input@
#
# Common rules for octave's libcruft directories.
#
# XXX FIXME XXX -- assumes that the libcruft directory tree is only
# one level deep.
#
# John W. Eaton
# jwe@bevo.che.wisc.edu
# University of Wisconsin-Madison
# Department of Chemical Engineering

SOURCES = *.f

DISTFILES = Makefile.in $(SOURCES) $(SPECIAL)

CRUFT_FSRC = $(wildcard $(srcdir)/*.f)
CRUFT_BASE = $(notdir $(CRUFT_FSRC))
CRUFT_OBJ = $(patsubst %.f, %.o, $(CRUFT_BASE))

ifeq ($(SHARED_LIBS), true)
  ifdef FPICFLAG
    CRUFT_PICOBJ := $(addprefix pic/, $(CRUFT_OBJ))
  endif
endif

CWD = $(shell pwd)
THISDIR = $(notdir $(CWD))

LIBCRUFT := ../libcruft.$(LIBEXT)

LIBCRUFT_OBJS = $(CRUFT_OBJ) $(SPECIAL_DEPEND)

LIBCRUFT_DEPS = $(LIBCRUFT)($(LIBCRUFT_OBJS))

ifeq ($(STATIC_LIBS), true)
  LIBCRUFT_DEPEND := $(LIBCRUFT_DEPS)
endif

all: pic $(LIBCRUFT_DEPEND) $(CRUFT_PICOBJ) $(SPECIAL_PICDEPEND)
.PHONY: all

.PRECIOUS: $(LIBCRUFT_OBJS)

pic:
	@if [ -d pic ]; then \
	  true; \
	else \
	  echo "mkdir pic"; \
	  mkdir pic; \
	fi

install:: all
.PHONY: install

uninstall::
.PHONY: uninstall

tags: $(SOURCES)
	ctags $(SOURCES)

TAGS: $(SOURCES)
	etags $(SOURCES)

clean::
	rm -f *.a *.o pic/*.o
.PHONY: clean

mostlyclean::
	rm -f *.o pic/*.o
.PHONY: mostlyclean

distclean:: clean
	rm -f Makefile
	-rmdir pic
.PHONY: distclean
	
maintainer-clean::
	rm -f tags TAGS Makefile
	-rmdir pic
.PHONY: maintainer-clean

dist:
	ln $(EXTERNAL_DISTFILES) ../../`cat ../../.fname`/libcruft/$(THISDIR)
.PHONY: dist