summaryrefslogtreecommitdiff
path: root/Makefile
blob: 34dcb753359407ef7da20b2c282a1ca2fd431905 (plain) (blame)
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
31
32
33
#INCLUDEFLAGS =

CFLAGS += $(INCLUDEFLAGS) -D_REENTRANT -ggdb3

LDFLAGS = -lssl -lcrypto

DEPS = $(shell $(CC) $(INCLUDEFLAGS) -MM -MT $(1).o $(1).c | sed -z 's/\\\n //g')

.PHONY: all clean cleanall release
all: haxserv

haxserv: main.o network.o commands.o table.o config.o tls.o utils.o
	$(CC) $^ -o $@ $(LDFLAGS)

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

$(call DEPS,main)

$(call DEPS,network)

$(call DEPS,commands)

$(call DEPS,table)

$(call DEPS,config)

$(call DEPS,tls)

$(call DEPS,utils)

clean:
	$(RM) haxserv *.o