# $Id: Exp$ # # Copyright (C) 2005 University of Marne-la-Vallee # # 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Name of file: $RCSfile$ CC = gcc RM = rm # Variables contenant les options des # commandes utilisées dans les différentes # cibles de notre Makefile CFLAGS = -Wall -ansi RMFLAGS = -f # On spécifie le chemin dans lequel on doit # aller chercher les en têtes en plus du # chemin par défaut qui est /usr/include/ INCLUDE = . # Liste tous les fichiers objets (sans édition de liens) OBJS = # Variable dans laquelle on spécifie le nom de # notre programme PROGNAME = syntaxTree # Variable dans laquelle on spécifie le nom du fichier # main MAIN = syntaxTree # On spécifie que la commande make clean sera # toujours effectuée même s'il existe un fichier # clean dans le répertoire courant .PHONY: clean # On spécifie la cible par défaut all: $(PROGNAME) # On donne les dépendances # Règle générique pour compiler les fichiers sources # ATTENTION : Il n'y a pas d'éditions de liens .c.o: $(CC) $(CFLAGS) -c -I $(INCLUDE) $< # On compile notre programme en faisant l'édition # de liens $(PROGNAME): $(OBJS) $(MAIN) $(CC) $(CFLAGS) $(OBJS) -I $(INCLUDE) $(MAIN) -o $@ # On nettoie le répertoire contenant les sources clean: $(RM) $(RMFLAGS) *.o *~ $(PROGNAME)