exo3: implement the primaries features requested
[TD_C.git] / exo3 / Makefile
... / ...
CommitLineData
1TARGET = exo3
2LIBS =
3CC = gcc
4# Enforce C11 ISO standard for now
5CFLAGS = -std=c11 -g -Wall
6LDFLAGS = -g -Wall
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