summaryrefslogtreecommitdiff
path: root/Makefile
blob: d06e101b18a7a747442f0e0678d4bf1c85eaf2b0 (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
CC = gcc
LD = gcc
CFLAGS += -std=c99 -g
CFLAGS += -D_GNU_SOURCE
CFLAGS += $(shell pkg-config --cflags libconfig)
CFLAGS += $(shell pcre-config --cflags)
CFLAGS += $(shell xml2-config --cflags)
CFLAGS += -pthread
LDFLAGS += $(shell pkg-config --libs libconfig)
LDFLAGS += $(shell pcre-config --libs)
LDFLAGS += $(shell xml2-config --libs)
LDFLAGS += -pthread
OBJECTS = main.o config.o regexset.o channel.o user.o word.o sdbm.o export_xml.o nick.o parsing.o
TARGET = ircstats

all: $(TARGET)

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

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

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