mirror of https://github.com/Chizi123/dnscomp.git

Joel Grunbaum
2022-05-23 e330e86abcad7cf60e46a5038ea492a9c5ca0e01
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
CC=gcc
_OBJ=main.o dns.o slist.o
_DEPS=dns.h servers.h slist.h
IDIR=include
CFLAGS=-Wall -g -lpthread
ODIR=obj
SRCDIR=src
 
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
 
default: dnscomp
 
%.o: %c $(DEPS)
    $(CC) -c -o $@ $< $(CFLAGS)
 
dnscomp: $(_OBJ)
    $(CC) -o $@ $^ $(CFLAGS)
 
.PHONY: clean
clean:
    rm -rf *.o *~