#
# To build DiaViewer.
#
DEB	=
OPT	=	-O2
#
OBJ	=	../Obj
SRC	=	.
#
CXX	=	g++
CC	=	gcc
#	
#
EXETYP	=	.exe
#
CXXFLG	=	-I/mingw64/include -I/mingw64/include/FL/images -mwindows -DWIN32 -DUSE_OPENGL32 \
                -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_PNG_H
#
# util ??? /usr/local/lib/libfltk_forms.a
LDFLG	=	-static -L/mingw64/lib -mwindows -lfltk_png -lz -lfltk_jpeg -lfltk_gl -lglu32 -lopengl32 \
                -lfltk -lole32 -luuid -lcomctl32
#
SRCS	=	DiaViewer_Main.cxx \
		DiaViewer_GL.cxx \
		DiaViewer_UI.cxx \
		DiaViewer_DLG.cxx \
		DiaViewer_DCM.cxx \
		DiaViewer_PRG.cxx \
		DiaViewer_DIA.cxx \
		DiaViewer_PrtImg.cxx \
		ImageMan_REF.cxx \
		ImageMan_MAP.cxx \
		ImageMan_JPG.cxx \
		ImageMan_PNG.cxx \
		ImageMan_BMP.cxx \
		SetUpMan.cxx
#
OBJS	=	\
        $(OBJ)/DiaViewer_Main.o \
		$(OBJ)/DiaViewer_GL.o \
		$(OBJ)/DiaViewer_UI.o \
		$(OBJ)/DiaViewer_DLG.o \
		$(OBJ)/DiaViewer_DCM.o \
		$(OBJ)/DiaViewer_PRG.o \
		$(OBJ)/DiaViewer_DIA.o \
		$(OBJ)/DiaViewer_PrtImg.o \
		$(OBJ)/ImageMan_REF.o \
		$(OBJ)/ImageMan_MAP.o \
		$(OBJ)/ImageMan_JPG.o \
		$(OBJ)/ImageMan_PNG.o \
		$(OBJ)/ImageMan_BMP.o \
		$(OBJ)/SetUpMan.o
EXES	=	$(BIN)/DiaViewer$(EXETYP)
#
#
#
all:	$(BIN)/DiaViewer$(EXETYP)
#
clean:
	rm $(BIN)/DiaViewer$(EXETYP) $(OBJ)/*.o
#
#
#
$(BIN)/DiaViewer${EXETYP}:	$(OBJS)
	$(CXX) $(DEB) $(OBJS) $(LDFLG) -o $@
#
$(OBJ)/SetUpMan.o:     SetUpMan.cxx SetUpMan.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/ImageMan_REF.o: ImageMan_REF.cxx ImageMan_REF.h ImageMan_MAP.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/ImageMan_MAP.o: ImageMan_MAP.cxx ImageMan_MAP.h ImageMan_JPG.h ImageMan_PNG.h ImageMan_BMP.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/$(OBJ)/ImageMan_JPG.o: ImageMan_JPG.cxx ImageMan_JPG.h ImageMan_MAP.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/ImageMan_PNG.o: ImageMan_PNG.cxx ImageMan_PNG.h ImageMan_MAP.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/ImageMan_BMP.o: ImageMan_BMP.cxx ImageMan_BMP.h ImageMan_MAP.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/$(OBJ)/DiaViewer_GL.o:	DiaViewer_GL.cxx DiaViewer_GBL.h DiaViewer_GL.h DiaViewer_UI.h DiaViewer_PRG.h 
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/DiaViewer_UI.o:	DiaViewer_UI.cxx DiaViewer_GL.h DiaViewer_UI.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/DiaViewer_DLG.o: DiaViewer_DLG.cxx DiaViewer_DCM.h DiaViewer_GBL.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/DiaViewer_DIA.o: DiaViewer_DIA.cxx DiaViewer_DIA.h ImageMan_REF.h ImageMan_MAP.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/DiaViewer_PRG.o: DiaViewer_PRG.cxx DiaViewer_PRG.h DiaViewer_GBL.h \
                 ImageMan_REF.h ImageMan_MAP.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/DiaViewer_DCM.o: DiaViewer_DCM.cxx DiaViewer_DCM.h DiaViewer_PRG.h DiaViewer_GBL.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/DiaViewer_PrtImg.o: DiaViewer_PrtImg.cxx DiaViewer_GlChoice.h DiaViewer_GL.h \
                 ImageMan_REF.h ImageMan_MAP.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#
$(OBJ)/DiaViewer_Main.o:   DiaViewer_Main.cxx DiaViewer_GL.h DiaViewer_UI.h \
                    DiaViewer_GBL.h SetUpMan.h
	$(CXX)	$(DEB) $(OPT) $(CXXFLG) -c $< -o $@
#


	



	
