2021-08-17 17:57:56 +00:00
|
|
|
CC = gcc
|
2022-05-20 21:28:07 +00:00
|
|
|
clientsrc = $(wildcard src/*.c) \
|
|
|
|
src/client/SilverMUDClient.c
|
2021-08-15 18:42:37 +00:00
|
|
|
clientobj = $(clientsrc:.c=.o)
|
2022-05-20 21:28:07 +00:00
|
|
|
serversrc = $(wildcard src/*.c) \
|
|
|
|
src/server/SilverMUDServer.c
|
2021-08-15 18:42:37 +00:00
|
|
|
serverobj = $(serversrc:.c=.o)
|
2022-03-06 00:36:42 +00:00
|
|
|
CLIENTLDFLAGS= -lpthread -lncurses -lgnutls
|
2022-04-07 00:38:36 +00:00
|
|
|
SERVERLDFLAGS= -lpthread -lncurses -lgnutls
|
2021-08-15 18:42:37 +00:00
|
|
|
SilverMUDClient: $(clientobj)
|
2022-10-18 20:00:57 +00:00
|
|
|
gcc -o $@ $^ $(CLIENTLDFLAGS)
|
2021-08-15 18:42:37 +00:00
|
|
|
|
|
|
|
SilverMUDServer: $(serverobj)
|
2022-10-18 20:00:57 +00:00
|
|
|
gcc -o $@ $^ $(SERVERLDFLAGS)
|
2021-11-04 23:14:47 +00:00
|
|
|
|
|
|
|
SilverMUDClientDebug: $(clientobj)
|
2022-10-30 12:58:39 +00:00
|
|
|
gcc -pg $^ $(CLIENTLDFLAGS) -o $@
|
2021-11-04 23:14:47 +00:00
|
|
|
|
|
|
|
SilverMUDServerDebug: $(serverobj)
|
2022-10-30 12:58:39 +00:00
|
|
|
gcc -pg $^ $(SERVERLDFLAGS) -o $@
|
2021-08-15 18:42:37 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2021-11-04 23:14:47 +00:00
|
|
|
rm -f $(clientobj) $(serverobj) SilverMUDClient SilverMUDServer SilverMUDClientDebug SilverMUDServerDebug
|
2021-08-15 18:42:37 +00:00
|
|
|
|
2022-10-30 12:58:39 +00:00
|
|
|
all: clean SilverMUDClient SilverMUDServer
|
2022-10-18 20:00:57 +00:00
|
|
|
all: CFLAGS += -Wall -Wextra -Ofast
|
2022-10-30 12:58:39 +00:00
|
|
|
debug: CFLAGS += -Wall -Wextra -pg -ggdb -Og
|
2022-10-18 20:00:57 +00:00
|
|
|
debug: clean SilverMUDClientDebug SilverMUDServerDebug
|