# # Copyright (c) 1994, 1995, 1996 Gunther Schadow. All rights reserved. # # This program 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 2 of the License, or # (at your option) any later version. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. TOPDIR := .. #CAREVUE = 1 ifdef CAREVUE LNCLUDE += -L$(TOPDIR)/hl7/CareVue/lib -L$(TOPDIR)/hl7/ukbf/lib \ -L$(TOPDIR)/astm/lib LOADLIBES+= -lastm -lhl7cv -lukbf -lsocket++ INCLUDE += -I$(TOPDIR)/include/hl7/CareVue -I$(TOPDIR)/include/hl7/ukbf \ -I$(TOPDIR)/include/astm else LNCLUDE += -L$(TOPDIR)/hl7/lib -L$(TOPDIR)/astm/lib LOADLIBES+= -lastm -lhl7 -lsocket++ INCLUDE += -I$(TOPDIR)/include/hl7 -I$(TOPDIR)/include/astm endif JUNK = *.log nmdclient client fclient server inout nserver mserver \ astmtest tiny SUBDIRS = messages radiometer # Oracle LOGLEVEL = L_JUNK CC_SRCS = inout.cc client.cc fclient.cc server.cc nmdclient.cc \ astmtest.cc tiny.cc PROGS = inout client fclient server nmdclient astmtest tiny DEFINES = -DLOGLEVEL=$(LOGLEVEL) -DDEBUG all: test progs include $(TOPDIR)/GNUmakefile.inc mserver: mserver.o nserver: nserver.o INOUT = ./inout MESSAGES = $(shell ls -1 messages/[A-Z][A-Z][A-Z][0-9]* 2>/dev/null) test: $(INOUT) echo testing the parser rm -f $(INOUT).log diff.log success=true ; \ for i in $(MESSAGES) ; do \ echo -n "trying $$i ... " ; \ $(INOUT) -l 6 -q $$i > $$i.io1 ; \ $(INOUT) -l 6 -q $$i.io1 > $$i.io2 ; \ cat $$i |tr '\r' '\n' > $$i.d1 ; \ cat $$i.io1 |tr '\r' '\n' > $$i.d2 ; \ diff -c $$i.d1 $$i.d2 >> diff.log ; \ rm -f $$i.d1 $$i.d2 ; \ if diff -q $$i.io1 $$i.io2 ; \ then \ echo "success" ; \ rm -f $$i.io1 $$i.io2 ; \ else \ echo "failed: $$i.io1 and $$i.io2 differ!" ; \ success=false ; \ fi ; \ done ; \ if grep -q "[EF] " inout.log ; \ then \ echo $(INOUT) reported errors in $(INOUT).log ; \ success=false ; \ else \ rm -f $(INOUT).log ; \ fi ; \ $$success ### Do not change this line, make depend uses it! ###