TP 9 exo2: Fix the link_delete function return value or code cleanup.
[TD_C.git] / TP_9 / exo1 / Makefile
... / ...
CommitLineData
1TARGET = exo1
2LIBS =
3CC = gcc
4# Enforce C11 ISO standard for now
5CFLAGS = -std=c11 -g -Wall -Wextra
6LDFLAGS = -g -Wall -Wextra
7
8.PHONY: default all clean
9
10default: $(TARGET)
11all: default
12
13OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
14HEADERS = $(wildcard *.h)
15
16%.o: %.c $(HEADERS)
17 $(CC) $(CFLAGS) -c $< -o $@
18
19.PRECIOUS: $(TARGET) $(OBJECTS)
20
21$(TARGET): $(OBJECTS)
22 $(CC) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $@
23
24clean:
25 -rm -f $(TARGET) $(OBJECTS)
26
27disassemble: $(TARGET)
28 objdump -d $< | less
29
30symbols: $(TARGET)
31 objdump -t $< | sort | less