2021-08-17 17:57:56 +00:00
|
|
|
CC = gcc
|
2021-08-15 18:42:37 +00:00
|
|
|
clientsrc = $(wildcard src/misc/*.c) \
|
|
|
|
src/SilverMUDClient.c
|
|
|
|
clientobj = $(clientsrc:.c=.o)
|
|
|
|
serversrc = $(wildcard src/misc/*.c) \
|
|
|
|
src/SilverMUDServer.c
|
|
|
|
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)
|
2021-11-04 23:14:47 +00:00
|
|
|
gcc -s -O3 -o $@ $^ $(CLIENTLDFLAGS)
|
2021-08-15 18:42:37 +00:00
|
|
|
|
|
|
|
SilverMUDServer: $(serverobj)
|
2021-11-04 23:14:47 +00:00
|
|
|
gcc -s -O3 -o $@ $^ $(SERVERLDFLAGS)
|
|
|
|
|
|
|
|
SilverMUDClientDebug: $(clientobj)
|
|
|
|
gcc -ggdb -Wall $^ $(CLIENTLDFLAGS) -o $@
|
|
|
|
|
|
|
|
SilverMUDServerDebug: $(serverobj)
|
|
|
|
gcc -ggdb -Wall $^ $(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
|
|
|
|
|
|
|
all: SilverMUDClient SilverMUDServer
|
2021-11-04 23:14:47 +00:00
|
|
|
|
|
|
|
debug: CFLAGS += -Wall -ggdb
|
|
|
|
debug: SilverMUDClientDebug SilverMUDServerDebug
|