# *****************************************************************************
# File: Makefile

# Rendu Graphique Avanc RGA
# Master Professionnel d'informatique
# Christian Jacquemin, Universit Paris 11

# Copyright (C) 2004 University Paris 11 
# This file is provided without support, instruction, or implied
# warranty of any kind.  University Paris 11 makes no guarantee of its
# fitness for a particular purpose and is not liable under any
# circumstances for any damages or loss whatsoever arising from the use
# or inability to use this file or items derived from it.
# ******************************************************************************
INCPATH = -I /usr/local/include -I /usr/X11R6/include -I /usr/include
LIBPATH = -L /usr/local/lib -L /usr/X11R6/lib -L /usr/lib
LIBRARY = -lglut -lGLU -lGL -lX11 -lXext -lXi -lXmu -lm -ljpeg -ltiff -lpng -lCgGL -lCg -lpthread 

CFLAGS = $(INCPATH)
LDFALGS = $(LIBPATH) $(LIBRARY)
GCC=/usr/bin/g++
SRC=src

all:
	make Herbe

%.o:$(SRC)/%.cpp
	$(GCC) -ggdb $(CFLAGS) -o $@ -c $<

%:%.o $(SRC)/%.cpp writetiff.o texjpeg.o texpng.o cg-lib.o
	$(GCC) $(LDFALGS) -o $@ writetiff.o texjpeg.o texpng.o cg-lib.o $< 

# cette commande permet de supprimer tous les objets
clean:
	@rm -f `/bin/ls *.o | grep -v Makefile | grep -v $(SRC)`
