#  Makefile to make all facilities
#
#  At this level, type 'make install'.  Everything gets
#  rebuilt from scratch.

RCS_VER = V2_10_2
RCS_MSG_FILE = /dicom1a/projects/dicom94/releases/release.19981022.2.10.2

install:
	echo "This is no longer the preferred installation method."
	echo "Please refer to installation notes."
#	$(DICOM_ROOT)/apps/scripts/createdirectory $(DICOM_LIB)
#	cd dicom		; make install
#	cd thread		; make install
#	cd lst			; make install
#	cd condition		; make install
#	cd chr			; make install
#	cd utility		; make install
#	cd hunks		; make install
#	cd database		; make install
#	cd his			; make install
#	cd cfg			; make install
#	cd uid			; make install
#	cd snp			; make install
#	cd dulprotocol		; make install
#	cd gq			; make install
#	cd objects		; make install
#	cd sq			; make install
#	cd info_entity		; make install
#	cd messages		; make install
#	cd services		; make install
#	cd hap			; make install
#	cd iap			; make install
#	cd print		; make install
#	cd icon			; make install
#	cd tbl			; make install
#	cd tblmb		; make install
#	cd manage		; make install
#	cd fis			; make install
#	cd idb			; make install
#	cd idbmb		; make install
#	cd icpy			; make install
#	cd iman			; make install
#	cd motif_utl		; make install
#	cd ddr			; make install
#	cd irs			; make install
#	cd xutl			; make install

export:
	$(DICOM_ROOT)/apps/scripts/createdirectory $(DICOM_LIBSRC)
	cd cfg			; make export
	cd chr			; make export
	cd condition		; make export
	cd database		; make export
	cd ddr			; make export
	cd dicom		; make export
	cd snp			; make export
	cd dulprotocol		; make export
	cd gq			; make export
	cd hap			; make export
	cd fis			; make export
	cd his			; make export
	cd hunks		; make export
	cd iap			; make export
	cd icpy			; make export
	cd idb			; make export
	cd idbmb		; make export
	cd icon			; make export
	cd iman			; make export
	cd info_entity		; make export
	cd irs			; make export
	cd lst			; make export
	cd manage		; make export
	cd messages		; make export
	cd motif_utl		; make export
	cd objects		; make export
	cd print		; make export
	cd services		; make export
	cd sq			; make export
	cd tbl			; make export
	cd tblmb		; make export
	cd thread		; make export
	cd uid			; make export
	cd utility		; make export
	cd xutl			; make export

headerexport:
	$(DICOM_ROOT)/apps/scripts/createdirectory $(DICOM_LIBSRC)
	cd cfg			; make headerexport
	cd chr			; make headerexport
	cd condition		; make headerexport
	cd database		; make headerexport
	cd ddr			; make headerexport
	cd dicom		; make headerexport
	cd snp			; make headerexport
	cd dulprotocol		; make headerexport
	cd gq			; make headerexport
	cd hap			; make headerexport
	cd fis			; make headerexport
	cd his			; make headerexport
	cd hunks		; make headerexport
	cd iap			; make headerexport
	cd icpy			; make headerexport
	cd idb			; make headerexport
	cd idbmb		; make headerexport
	cd icon			; make headerexport
	cd iman			; make headerexport
	cd info_entity		; make headerexport
	cd irs			; make headerexport
	cd lst			; make headerexport
	cd manage		; make headerexport
	cd messages		; make headerexport
	cd motif_utl		; make headerexport
	cd objects		; make headerexport
	cd print		; make headerexport
	cd services		; make headerexport
	cd sq			; make headerexport
	cd tbl			; make headerexport
	cd tblmb		; make headerexport
	cd thread		; make headerexport
	cd uid			; make headerexport
	cd utility		; make headerexport
	cd xutl			; make headerexport

links:
	$(DICOM_ROOT)/apps/scripts/checkEnvironment DICOM_LIBSRC $(DICOM_LIBSRC)
	$(DICOM_ROOT)/apps/scripts/createdirectory $(DICOM_LIBSRC)
	cd cfg			; make links
	cd chr			; make links
	cd condition		; make links
	cd database		; make links
	cd ddr			; make links
	cd dicom		; make links
	cd snp			; make links
	cd dulprotocol		; make links
	cd gq			; make links
	cd hap			; make links
	cd fis			; make links
	cd his			; make links
	cd hunks		; make links
	cd iap			; make links
	cd icpy			; make links
	cd idb			; make links
	cd idbmb		; make links
	cd icon			; make links
	cd iman			; make links
	cd info_entity		; make links
	cd irs			; make links
	cd lst			; make links
	cd manage		; make links
	cd messages		; make links
	cd motif_utl		; make links
	cd objects		; make links
	cd print		; make links
	cd services		; make links
	cd sq			; make links
	cd tbl			; make links
	cd tblmb		; make links
	cd thread		; make links
	cd uid			; make links
	cd utility		; make links
	cd xutl			; make links

links.mb:
	$(DICOM_ROOT)/apps/scripts/checkEnvironment DICOM_LIBSRC $(DICOM_LIBSRC)
	$(DICOM_ROOT)/apps/scripts/createdirectory $(DICOM_LIBSRC)
	cd cfg			; make links
	cd chr			; make links
	cd condition		; make links
	cd database		; make links
	cd ddr			; make links
	cd dicom		; make links
	cd snp			; make links
	cd dulprotocol		; make links
	cd gq			; make links
	cd hap			; make links
	cd fis			; make links
	cd his			; make links
	cd hunks		; make links
	cd iap			; make links
	cd icpy			; make links
	cd idb			; make links
	cd idbmb		; make links
	cd icon			; make links
	cd iman			; make links
	cd info_entity		; make links
	cd irs			; make links
	cd lst			; make links
	cd manage		; make links
	cd messages		; make links
	cd motif_utl		; make links
	cd objects		; make links
	cd print		; make links
	cd services		; make links
	cd sq			; make links
	cd tbl			; make links
	cd tblmb		; make links
	cd thread		; make links
	cd uid			; make links
	cd utility		; make links
	cd xutl			; make links.mb

clean:
	cd cfg			; make clean
	cd chr			; make clean
	cd condition		; make clean
	cd database		; make clean
	cd ddr			; make clean
	cd dicom		; make clean
	cd snp			; make clean
	cd dulprotocol		; make clean
	cd gq			; make clean
	cd hap			; make clean
	cd fis			; make clean
	cd his			; make clean
	cd hunks		; make clean
	cd iap			; make clean
	cd icpy			; make clean
	cd idb			; make clean
	cd idbmb		; make clean
	cd icon			; make clean
	cd iman			; make clean
	cd info_entity		; make clean
	cd irs			; make clean
	cd lst			; make clean
	cd manage		; make clean
	cd messages		; make clean
	cd motif_utl		; make clean
	cd objects		; make clean
	cd print		; make clean
	cd services		; make clean
	cd sq			; make clean
	cd tbl			; make clean
	cd tblmb		; make clean
	cd thread		; make clean
	cd uid			; make clean
	cd utility		; make clean
	cd xutl			; make clean

checkout:
	cd cfg			; make checkout
	cd chr			; make checkout
	cd condition		; make checkout
	cd database		; make checkout
	cd ddr			; make checkout
	cd dicom		; make checkout
	cd snp			; make checkout
	cd dulprotocol		; make checkout
	cd gq			; make checkout
	cd hap			; make checkout
	cd fis			; make checkout
	cd his			; make checkout
	cd hunks		; make checkout
	cd iap			; make checkout
	cd icpy			; make checkout
	cd idb			; make checkout
	cd idbmb		; make checkout
	cd icon			; make checkout
	cd iman			; make checkout
	cd info_entity		; make checkout
	cd irs			; make checkout
	cd lst			; make checkout
	cd manage		; make checkout
	cd messages		; make checkout
	cd motif_utl		; make checkout
	cd objects		; make checkout
	cd print		; make checkout
	cd services		; make checkout
	cd sq			; make checkout
	cd tbl			; make checkout
	cd tblmb		; make checkout
	cd thread		; make checkout
	cd uid			; make checkout
	cd utility		; make checkout
	cd xutl			; make checkout

checkin:
	cd cfg			; make checkin
	cd chr			; make checkin
	cd condition		; make checkin
	cd database		; make checkin
	cd ddr			; make checkin
	cd dicom		; make checkin
	cd snp			; make checkin
	cd dulprotocol		; make checkin
	cd gq			; make checkin
	cd hap			; make checkin
	cd fis			; make checkin
	cd his			; make checkin
	cd hunks		; make checkin
	cd iap			; make checkin
	cd icpy			; make checkin
	cd idb			; make checkin
	cd idbmb		; make checkin
	cd icon			; make checkin
	cd iman			; make checkin
	cd info_entity		; make checkin
	cd irs			; make checkin
	cd lst			; make checkin
	cd manage		; make checkin
	cd messages		; make checkin
	cd motif_utl		; make checkin
	cd objects		; make checkin
	cd print		; make checkin
	cd services		; make checkin
	cd sq			; make checkin
	cd tbl			; make checkin
	cd tblmb		; make checkin
	cd thread		; make checkin
	cd uid			; make checkin
	cd utility		; make checkin
	cd xutl			; make checkin

indent:
	cd cfg			; make indent
	cd chr			; make indent
	cd condition		; make indent
	cd database		; make indent
	cd ddr 			; make indent
	cd dicom		; make indent
	cd snp 			; make indent
	cd dulprotocol		; make indent
	cd gq			; make indent
	cd hap			; make indent
	cd fis			; make indent
	cd his			; make indent
	cd hunks		; make indent
	cd iap			; make indent
	cd icpy			; make indent
	cd idb			; make indent
	cd idbmb		; make indent
	cd icon			; make indent
	cd iman			; make indent
	cd info_entity		; make indent
	cd irs			; make indent
	cd lst			; make indent
	cd manage		; make indent
	cd messages		; make indent
	cd motif_utl		; make indent
	cd objects		; make indent
	cd print		; make indent
	cd services		; make indent
	cd sq			; make indent
	cd tbl			; make indent
	cd tblmb		; make indent
	cd thread		; make indent
	cd uid			; make indent
	cd utility		; make indent
	cd xutl			; make indent

lint:
	cd cfg			; make lint
	cd chr			; make lint
	cd condition		; make lint
	cd database		; make lint
	cd ddr			; make lint
	cd dicom		; make lint
	cd snp			; make lint
	cd dulprotocol		; make lint
	cd gq			; make lint
	cd hap			; make lint
	cd fis			; make lint
	cd his			; make lint
	cd hunks		; make lint
	cd iap			; make lint
	cd icpy			; make lint
	cd idb			; make lint
	cd idbmb		; make lint
	cd icon			; make lint
	cd iman			; make lint
	cd info_entity		; make lint
	cd irs			; make lint
	cd lst			; make lint
	cd manage		; make lint
	cd messages		; make lint
	cd motif_utl		; make lint
	cd objects		; make lint
	cd print		; make lint
	cd services		; make lint
	cd sq			; make lint
	cd tbl			; make lint
	cd tblmb		; make lint
	cd thread		; make lint
	cd uid			; make lint
	cd utility		; make lint

freeze:
	cd cfg			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd chr			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd condition		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd database		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd ddr			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd dicom		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd snp			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd dulprotocol		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd gq			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd hap			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd fis			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd his			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd hunks		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd iap			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd icpy			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd idb			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd idbmb		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd icon			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd iman			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd info_entity		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd irs			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd lst			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd manage		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd messages		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd motif_utl		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd objects		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd print		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd services		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd sq			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd tbl			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd tblmb		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd thread		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd uid			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd utility		; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)
	cd xutl			; rcsfreeze $(RCS_VER) < $(RCS_MSG_FILE)

stripmb:
	chmod +w chr/*.[ch];	rm -f chr/*.[ch]
	chmod +w idbmb/*.[ch];	rm -f idbmb/*.[ch]
	chmod +w tblmb/*.[ch];	rm -f tblmb/*.[ch]
	chmod +w xutl/*.[ch];	rm -f xutl/xutl_mb.c
