################################################
# Interface graphique GTK par Alain Bouju
################################################

# Commandes Types

include  Makefile.config

# Option de compilation

PREFIX=/opt/TAI

CC=c++ -g -DUSE_XPM

# WXXT base directory
WXBASEDIR=/home/abouju/mercure/wxGTK
#

# set the OS type for compilation
OS=linux
# compile a library only
RULE=bin

# define library name
BIN_TARGET=test
# define library sources
BIN_SRC=\
Interface.cpp

#define library objects
BIN_OBJ=\
Interface.o

# additional things needed to link
BIN_LINK=

# additional things needed to compile
ADD_COMPILE=

HEADERS	      = Interface.h\
		ImageBin.h\
		ImageGray256.h\
		ImagePGM.h\
		ImageDouble.h\
		MasqueDouble.h\
		MasqueBin.h\
		InterfaceImageGray256.h

SOURCES	      = Interface.cpp\
		ImageBin.cpp\
		ImageGray.256.cpp\
		ImagePGM.cpp\
		ImageDouble.cpp\
		MasqueDouble.cpp\
		MasqueBin.cpp

OBJECTS       = Interface.o\
		ImageBin.o\
		ImageGray256.o\
		ImagePGM.o\
		ImageDouble.o\
		MasqueDouble.o\
		MasqueBin.o\
		InterfaceImageGray256.o

LIB           = 

#------------------------------------------------------------------------
# Compilation des programmes
#------------------------------------------------------------------------
all: ${OS}/Interface

${OS}/Interface : ${OBJECTS}
	${CC}  `wx-config --libs` ${OBJECTS} -o ${OS}/Interface

Interface.o : Interface.cpp ${HEADERS}
	${CC} -c Interface.cpp -DPREFIX=\"${PREFIX}\" `wx-config --cflags`

ImageBin.o : ImageBin.cpp ImageBin.h ImageGray256.h
	${CC} -c ImageBin.cpp `wx-config --cflags`

ImageGray256.o : ImageGray256.cpp ImageGray256.h
	${CC} -c ImageGray256.cpp `wx-config --cflags`

ImagePGM.o : ImagePGM.cpp ImagePGM.h ImageGray256.h
	${CC} -c ImagePGM.cpp `wx-config --cflags`

ImageDouble.o : ImageDouble.cpp ImageDouble.h ImageGray256.h
	${CC} -c ImageDouble.cpp `wx-config --cflags`

MasqueDouble.o : MasqueDouble.cpp MasqueDouble.h ImageGray256.h ImageDouble.h
	${CC} -c MasqueDouble.cpp `wx-config --cflags`

MasqueBin.o : MasqueBin.cpp MasqueBin.h ImageBin.h
	${CC} -c MasqueBin.cpp `wx-config --cflags`

InterfaceImageGray256.o : InterfaceImageGray256.cpp InterfaceImageGray256.h ImageGray256.h ImageGray256.cpp
	${CC} -c InterfaceImageGray256.cpp `wx-config --cflags`
#-----------------------------------------------------------------------
# Netoyage
#-----------------------------------------------------------------------

clean:
	rm -f *.o
	rm -f ${OS}/Interface
	rm -f core

#-----------------------------------------------------------------------
# Installation
#-----------------------------------------------------------------------
install:
	mkdir -p ${PREFIX}
	mkdir -p ${PREFIX}/bin
	mkdir -p ${PREFIX}/share
	mkdir -p ${PREFIX}/share/masque
	cp -f linux/Interface ${PREFIX}/bin
	cp -f masque/laplacien.mf ${PREFIX}/share/masque
	cp -f masque/moyen3x3.mf ${PREFIX}/share/masque
	cp -f masque/noyau.mb ${PREFIX}/share/masque


# ancienne version
# include the definitions now
#include template.mak
