Bonjour je développe une bibliothèque statique. Pour gérer cette bibliothèque j'utilise un makefile

le voici :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
REP_SRC=	SRC/
 
REP_OBJ=	OBJ/
 
NAME=		libft.a
 
FLAG=		-Wall -Wextra -Werror
 
SRC=		$(wildcard $(REP_SRC)*.c)
 
OBJ=		$(wildcard *.o)
 
OBJ2=		$(wildcard $(REP_OBJ)*.o)
 
all:
			gcc -c $(FLAG) $(SRC)
			mv $(OBJ) $(REP_OBJ)
			ar r $(NAME) $(OBJ2)
			ranlib $(NAME)
 
clean:
			rm -f $(OBJ2)
 
re: clean all
Je ne suis pas tres bon en makefile...

Il fonctionne a moitié, mon problème est qu'a la première compilation, il plante, car mv ne trouve pas mes fichiers objets...Apres c'est bon!

Je ne comprend pas pourquoi...Quelqu'un peu m'aider svp?

Merci