summaryrefslogtreecommitdiff
path: root/Makefile
blob: 18950d17963377b2afa2ad408fdfe8bdf7e0647e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CC = gcc
LD = gcc
CFLAGS += -std=c99
CFLAGS += $(shell pkg-config --cflags libconfig)
CFLAGS += $(shell pcre-config --cflags)
LDFLAGS += $(shell pkg-config --libs libconfig)
LDFLAGS += $(shell pcre-config --libs)
OBJECTS = main.o config.o regexset.o
TARGET = ircstats

all: $(TARGET)

$(TARGET): $(OBJECTS)
	$(LD) $(LDFLAGS) -o $@ $^

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<

clean:
	rm -f $(OBJECTS) $(TARGET)