# Makefile for octave's dlfcn directory
#
# Copyright (C) 1996, 1997, 2007 John W. Eaton
#
# This file is part of Octave.
# 
# Octave is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
# 
# Octave is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License
# along with Octave; see the file COPYING.  If not, see
# <http://www.gnu.org/licenses/>.

TOPDIR = ..

srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@

include $(TOPDIR)/Makeconf

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

INCLUDES := dlfcn.h

SOURCES := dlfcn.c

OBJECTS := $(SOURCES:.c=.o)

MAKEDEPS := $(SOURCES:.c=.d)

DISTFILES := $(addprefix $(srcdir)/, $(SOURCES) $(INCLUDES) README dl.exp Makefile.in ftp-site)

all: libdlfcn.a
.PHONY: all

libdlfcn.a: $(OBJECTS)
	$(AR) $(ARFLAGS) $@ $(OBJECTS)
	$(RANLIB) $@

check: all
.PHONY: check

install install-strip: all
.PHONY: install install-strip

uninstall:
.PHONY: uninstall

tags: $(SOURCES)
	ctags $(SOURCES)

TAGS: $(SOURCES)
	etags $(SOURCES)

clean:
	rm -f *.a *.o *.d
.PHONY: clean

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

distclean: clean
	rm -f Makefile
.PHONY: distclean

maintainer-clean: distclean
	rm -f tags TAGS
.PHONY: maintainer-clean

dist:
	ln $(DISTFILES) ../`cat ../.fname`/dlfcn
.PHONY: dist

conf-dist:
	ln $(addprefix $(srcdir)/, octave.cc Makefile.in) ../`cat ../.fname`/dlfcn
.PHONY: conf-dist

ifndef omit_deps
-include $(MAKEDEPS)
endif
