summaryrefslogtreecommitdiffstats
path: root/src/server/Makefile
blob: 42d8361d486253565867abf203b1de448928384f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CPP = g++
CPPFLAGS = -Wall -g $(shell mariadb_config --cflags --libs)
SOURCES = main.cpp sockets.cpp ChatServer.cpp UserInfo.cpp UserInfo_io.cpp ChatRoom.cpp ChatRoom_cmd.cpp database.cpp
OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE = server

.PHONY: all clean

all: $(EXECUTABLE)

clean:
	@rm -rf $(OBJECTS) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	@$(CPP) $(CPPFLAGS) -o $(EXECUTABLE) $(OBJECTS)

$(OBJECTS):
	@$(CPP) -c $(CPPFLAGS) $(SOURCES)