summaryrefslogtreecommitdiff
path: root/Makefile
blob: feaf3e3955a4502a249171c121c6635baf0d77a5 (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
26
27
28
29
30
31
CXX=g++
LD=g++

CFLAGS=-pedantic -Wall --std=c++17

OBJS=src/main.o \
    src/CGIScript.o \
    src/ClientConnection.o \
    src/ServerConnection.o \
    src/HttpRequest.o \
    src/HttpResponse.o

DESTDIR=/usr/local/bin/

all: cfws

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

cfws: $(OBJS)
	$(LD) $^ -o $@ $(CFLAGS)

.PHONY: clean

clean:
	rm -f $(OBJS) cfws

.PHONY: install

install: all
	install -m 0755 ./cfws -t $(DESTDIR)