BuildSystem: Even more sync to latest
[TD_C.git] / TP_8 / exo2 / Makefile
CommitLineData
731a470e
JB
1TARGET = exo2
2LIBS =
3CC = gcc
4# Enforce C11 ISO standard for now
edbb50f7
JB
5CFLAGS = -std=c11 -g -Wall -Wextra
6LDFLAGS = -g -Wall -Wextra
731a470e
JB
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