This commit is contained in:
2025-03-21 10:59:34 +10:00
commit 32e2a09b8d
7 changed files with 1062 additions and 0 deletions

27
Makefile Normal file
View File

@@ -0,0 +1,27 @@
CC=gcc
CFLAGS=-std=gnu99 -Wall -pedantic -I/local/courses/csse2310/include
LIBCFLAGS=-fPIC $(CFLAGS)
LDFLAGS=-L/local/courses/csse2310/lib -lcsse2310a4
.PHONY: all debug profile clean
.DEFAULT_GOAL := all
all: dbclient dbserver libstringstore.so
debug: CFLAGS += -g
debug: all
profile: CFLAGS += -pg -fprofile-arcs -ftest-coverage
profile: all
dbserver: dbserver.c dbserver.h
$(CC) $(CFLAGS) -pthread $(LDFLAGS) -lcsse2310a3 -lstringstore -o $@ $^
stringstore.o: stringstore.c /local/courses/csse2310/include/stringstore.h
$(CC) $(LIBCFLAGS) -c $<
libstringstore.so: stringstore.o
$(CC) -shared -o $@ stringstore.o
clean:
rm -f dbclient dbserver libstringstore.so *.o