-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 918 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CC=gcc
CFLAGS=-Wall
INCLUDE=include
SRC=src
OBJ=obj
DEPSCOMMANDES=$(INCLUDE)/commandes.h $(INCLUDE)/arborescence.h $(INCLUDE)/traitement.h
DEPSPARSING=$(INCLUDE)/parsing.h $(INCLUDE)/commandes.h $(INCLUDE)/traitement.h
Main: $(OBJ)/traitement.o $(OBJ)/arborescence.o $(OBJ)/commandes.o $(OBJ)/parsing.o $(OBJ)/Main.o
$(CC) $(CFLAGS) -o $@ $^
clean:
rm -rf Main $(OBJ)/*.o
$(OBJ)/traitement.o: $(SRC)/traitement.c $(INCLUDE)/traitement.h
$(CC) $(CFLAGS) -c $<
mv ./traitement.o obj/
$(OBJ)/arborescence.o: $(SRC)/arborescence.c $(INCLUDE)/arborescence.h $(INCLUDE)/traitement.h
$(CC) $(CFLAGS) -c $<
mv arborescence.o obj/
$(OBJ)/commandes.o: $(SRC)/commandes.c $(DEPSCOMMANDES)
$(CC) $(CFLAGS) -c $<
mv commandes.o obj/
$(OBJ)/parsing.o: $(SRC)/parsing.c $(DEPSPARSING)
$(CC) $(CFLAGS) -c $<
mv parsing.o obj/
$(OBJ)/Main.o: $(SRC)/Main.c $(INCLUDE)/parsing.h
$(CC) $(CFLAGS) -c $<
mv Main.o obj/