forked from SebArola/RedStringProject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 641 Bytes
/
Makefile
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
35
36
CC=gcc
CFLAGS=
LDFLAGS= -lm -std=c99 -ansi
EXEC=main
EXEC_INDEX = index
EXEC_TEST=test_pile
DIREXEC=./Exec/
DIRSRC=./Src/
DIRTEST=./Test/
SRC=
OBJS=$(SRC:.c=.o)
SRC_INDEXATION=$(wildcard ./Src/Indexation/*.c)
OBJS_INDEXATION=$(SRC_INDEXATION:.c=.o)
SRC_TEST=$(DIRTEST)test_pileDescripteur.c $(wildcard ./Src/*.c)
OBJS_TEST=$(SRC_TEST:.c=.o)
all: clean $(EXEC_INDEX)
mv ./$(EXEC_INDEX) $(DIREXEC)
test_pile :$(OBJS_TEST)
$(CC) -o $@ $^ $(LDFLAGS)
index: $(OBJS_INDEXATION)
$(CC) -o $@ $^ $(LDFLAGS)
main: $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
clean:
rm -rf *.o
mrproper: clean
rm -rf $(EXEC)