1
0

proj: Add exam-2020W-2A

This commit is contained in:
2025-05-05 12:05:50 +02:00
parent 1e40a1b3c6
commit 57405421fa
9 changed files with 1006 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
##
# Makefile for server.
#
# config
DEFS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_POSIX_C_SOURCE=200809 -D_XOPEN_SOURCE
override CFLAGS += -Wall -g -std=c99 -pedantic $(DEFS)
override LDFLAGS +=
override LIBS += -pthread -lrt
# objects to build
OBJS = server.o
# objects to link (already built)
LDOBJS = server_lib.o
# rules
.PHONY : all clean
all: server
server: $(OBJS) $(LDOBJS)
gcc $(LDFLAGS) -o $@ $^ $(LIBS)
%.o: %.c
gcc $(CFLAGS) -c -o $@ $<
clean:
rm -f server $(OBJS)
# dependencies
server.o: server.c