blob: e9bbb9183bd39dda7fa83c8561a3904f8d72d95e (
plain)
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
|
CC = gcc
CFLAGS = -Wall -Wextra -std=c11 -g -fwrapv -I$(TERMIO)/include
LDFLAGS = -L$(TERMIO)/lib -ltermio
TERMIO = $(HOME)/prefix
TARGETS = client
.PHONY: all clean remake
# Clear all implicit suffix rules
.SUFFIXES:
# Don't delete intermediate files
.SECONDARY:
all: $(TARGETS)
clean:
rm -f $(TARGETS) *.o
remake: clean
$(MAKE) all
$(TARGETS): $(patsubst %.c,%.o,$(wildcard *.c))
$(CC) -o $@ $^ $(LDFLAGS)
%.o: %.c $(wildcard *.h)
$(CC) $(CFLAGS) -c -o $@ $<
|