#
# Imakefile
#
# Imakefile for .src data structure access function library
#

TOBJS = test_f.o test1.o test2.o test3.o test4.o
LOBJS = dotsrc1.o dotsrc2.o dotsrc3.o dotsrc4.o common.o hash.o

EXTLDOPTIONS = -L.
LIBS = -lqxtsrc -lm
INCLUDES =
LINKLIBS =

all: dotsrc.h libqxtsrc.a # test

dotsrc.h: body.h idm1.h idm2.h idm3.h idm4.h common.h \
		rm1.h rm2.h rm3.h rm4.h \
		wm1.h wm2.h wm3.h wm4.h \
		ex1.h ex2.h ex3.h ex4.h mdebug.h
	$(CAT) body.h idm1.h idm2.h idm3.h idm4.h common.h \
		rm1.h rm2.h rm3.h rm4.h \
		wm1.h wm2.h wm3.h wm4.h \
		ex1.h ex2.h ex3.h ex4.h > dotsrc.h

#ifdef	BSD
MakeLibraryWithFlags(libqxtsrc.a,$(LOBJS),ruc)
#else
MakeLibraryWithFlags(libqxtsrc.a,$(LOBJS),u)
#endif

test: test_h test_f

test_h: test_h.c dotsrc.h
#	lint test_h.c

MakeTargetWithFlags(test_f,$(TOBJS),$(LDFLAGS),libqxtsrc.a,$(LIBS))

InstallLibrary(install,libqxtsrc.a,$(QXTLIB))

install:: dotsrc.h
	MakeDir($(QXTINCLUDE))
	${SED} '/#include "mdebug.h"/d' dotsrc.h > $(QXTINCLUDE)/dotsrc.h

clean::
	-${RM} -f dotsrc.h libqxtsrc.a test_f

CleanTarget()

dotsrc1.o: dotsrc1.c dotsrc.h
dotsrc2.o: dotsrc2.c dotsrc.h
dotsrc3.o: dotsrc3.c dotsrc.h
dotsrc4.o: dotsrc4.c dotsrc.h
common.o: common.c dotsrc.h
hash.o: hash.c hash.h

test_f.o: test_f.c dotsrc.h
test1.o: test1.c dotsrc.h
test2.o: test2.c dotsrc.h
test3.o: test3.c dotsrc.h
test4.o: test4.c dotsrc.h
