Aide Linux - Liste de diffusion Ze-Linux hebergée par Hebergement - Over-Link
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[compilation] makefile



Salut a tous,

J'ai une question basique a propos des makefile (c'est le premier que je fais).
Le contenu est ci dessous. Le probleme est qu'il ne vas pas lire les fichiers
la ou ils sont, c a d dans ../library. Comme si mon VPATH ne fonctionnait pas.
Est-ce que vous savez pourquoi ?

Question subsidiaire : Je voudrai que srcdir prenne la valeur du repertoire
courant, pour que la compilation se fonctionne que l'on ai mis l'archive dans
HOME ou usr/local. Comment puis-je faire ca ?

Si vous avez des remarques n'hesitez pas, g pompe ce que j'ai pu, pour faire
dasn les normes sur gnu.org

Merci pour tout.

Denis

# Common prefix for installation directories.
# NOTE: This directory must exist when you start the install.
prefix = /usr/local

exec_prefix = $(prefix)/Ocirc

# Where to put the executable for the command `gcc'.
bindir = $(exec_prefix)/bin

# Where to put the directories used by the compiler.
libexecdir = $(exec_prefix)/libexec_ds

srcdir = ~/Denis/Work/Ocirc

# Look for any files needed in ../library and ../library/dslib
VPATH = $(srcdir)/library:$(srcdir)/library/dslib/:$(srcdir)/ds/

FILES   = *.c *.h


OBJECTS = backgroundgrid.o curvature.o delaunay.o discretizecurve_new.o
distance.o gridio.o insertnewnodes.o main.o matching.o minmax.o plotio.o
proximity.o readinput.o smoothcurve.o spline.o userrefinement.c


CC      = i386-redhat-linux-gcc # cc

EXE     = $(bindir)

MAKE    = makefile

INCLUDE = ds.h bgg.h


CFLAGS  = -ansi -Wall -g -pipe #-I${INSTDIR}/lib         #-xansi -c -O
-I${HOME}/lib/include



#LFLAGS  = -p

LIBS    = list.a mem.a



$(EXE): $(OBJECTS)

        $(CC) -o $(EXE) $(LFLAGS) $(OBJECTS) $(LIBS) -lm



$(OBJECTS): $(MAKE) $(INCLUDE)



#.c.o:
%.o: %.c

        $(CC) $(CFLAGS) $<

#        lint -u -I/n/engin/shock/u/ashford $<



clean:

        rm *.o ${INSTDIR}/bin/ds



tar:

        tar cvf ../ds_${VERSION}.tar ${FILES}

        gzip ../ds_${VERSION}.tar

        ls -l ../
----------------------------------
Informations, désabonnement, règles, obligations sur la liste Aide-Linux :
http://lists.ze-linux.org/howto_ml.html
Liste Herbergee par Over-Link [http://www.over-link.net]
----------------------------------
Annonces immobilieres, auto, moto ... http://www.uneannonce.fr


Aide Linux - Liste de diffusion Ze-Linux hebergée par Hebergement - Over-Link