#
#	Makefile for dcmimage/libsrc
#

@SET_MAKE@

SHELL = /bin/sh
VPATH = @srcdir@:@top_srcdir@/include:@top_srcdir@/@configdir@/include
srcdir = @srcdir@
top_srcdir = @top_srcdir@
configdir = @top_srcdir@/@configdir@

include $(configdir)/@common_makefile@

ofstddir = $(top_srcdir)/../ofstd
oflogdir = $(top_srcdir)/../oflog
dcmdatadir = $(top_srcdir)/../dcmdata
dcmimgledir = $(top_srcdir)/../dcmimgle

# Special defines for the Library, define them in LOCALDEFS
#   REVERSE_OVERLAY_ORIGIN_ORDER
#   swap order of overlay origin coordinates
# LOCALDEFS = -DREVERSE_OVERLAY_ORIGIN_ORDER

LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/include \
	-I$(dcmimgledir)/include

objs = dicoimg.o dicopx.o dicoopx.o diregist.o dilogger.o \
	diargimg.o dicmyimg.o dihsvimg.o dipalimg.o dirgbimg.o \
	diybrimg.o diyf2img.o diyp2img.o dipitiff.o dipipng.o \
	diqtctab.o diqtfs.o diqthash.o diqthitl.o diqtpbox.o \
	diquant.o dcmicmph.o

library = libdcmimage.$(LIBEXT)


all: $(library)

$(library): $(objs)
	$(AR) $(ARFLAGS) $@ $(objs)
	$(RANLIB) $@


install: $(library)
	$(configdir)/mkinstalldirs $(DESTDIR)$(libdir)
	$(INSTALL_DATA) $(library) $(DESTDIR)$(libdir)/$(library)
	$(RANLIB) $(DESTDIR)$(libdir)/$(library)


clean:
	rm -f $(objs) $(library) $(TRASH)

distclean:
	rm -f $(objs) $(library) $(DISTTRASH)


dependencies:
	$(CXX) -MM $(defines) $(includes) $(CPPFLAGS) $(CXXFLAGS) *.cc  > $(DEP)

include $(DEP)
