aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: 6bc8b10278b79e9729d423b119619f77747e604e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.PHONY: all clean plugins
PLUGINPATH ?= plugins/

CFLAGS += -g -Wall -Wpedantic -DPLUGINS=\"$(PLUGINPATH)\"
LDLIBS = -lnettle -ldl

OBJECTS = builtins.o network.o websocket.o plugin.o config.o

all: websocksy

plugins:
	$(MAKE) -C plugins

websocksy: LDFLAGS += -Wl,-export-dynamic
websocksy: websocksy.c websocksy.h $(OBJECTS) plugins
	$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(OBJECTS) $(LDLIBS)

clean:
	$(RM) $(OBJECTS)
	$(RM) websocksy