From 7f1d6bbc335288df1e24e7c8f305c32afe6b050a Mon Sep 17 00:00:00 2001 From: cflip Date: Mon, 8 May 2023 21:25:21 -0600 Subject: Begin rewriting cfws in C --- Makefile | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index feaf3e3..81c0b3d 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,25 @@ -CXX=g++ -LD=g++ +CC=gcc +LD=gcc -CFLAGS=-pedantic -Wall --std=c++17 +CFLAGS=-Wall -Wextra -pedantic -std=c89 +LDFLAGS= -OBJS=src/main.o \ - src/CGIScript.o \ - src/ClientConnection.o \ - src/ServerConnection.o \ - src/HttpRequest.o \ - src/HttpResponse.o +OBJS=cfws.o http.o DESTDIR=/usr/local/bin/ +.PHONY: all clean install + all: cfws -%.o: %.cpp - $(CXX) $< -o $@ -c $(CFLAGS) +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ cfws: $(OBJS) - $(LD) $^ -o $@ $(CFLAGS) - -.PHONY: clean + $(LD) $(LDFLAGS) $^ -o $@ clean: rm -f $(OBJS) cfws -.PHONY: install - install: all install -m 0755 ./cfws -t $(DESTDIR) -- cgit v1.2.3