init
This commit is contained in:
27
Makefile
Normal file
27
Makefile
Normal 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
|
||||
Reference in New Issue
Block a user