Browse Source

added port changing

jgabor 1 year ago
parent
commit
7e1ede70a6
2 changed files with 5 additions and 0 deletions
  1. 2 0
      Makefile
  2. 3 0
      game_server.c

+ 2 - 0
Makefile

@@ -1,5 +1,7 @@
 CC = gcc
 CFLAGS = -Wall -std=gnu99
+PORT=8087
+CFLAGS+= -DPORT=\$(PORT)
 
 default: boggle_server
 

+ 3 - 0
game_server.c

@@ -1,4 +1,7 @@
 #define _GNU_SOURCE
+#ifndef PORT
+  #define PORT 8087
+#endif
 #include "game_server.h"
 
 Player *player_list = NULL;