Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
subarnasaikia authored Jan 3, 2024
1 parent 26dccbc commit 3fa6413
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Makefile for Tic-Tac-Toe game

CXX = g++
CXXFLAGS = -std=c++11 -I./include -Wall -Wextra

SRCDIR = src
INCDIR = include
OBJDIR = obj

SOURCES := $(wildcard $(SRCDIR)/*.cpp) main.cpp
OBJECTS := $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SOURCES))
EXECUTABLE = TicTacToe

$(OBJDIR)/%.o: $(SRCDIR)/%.cpp | $(OBJDIR)
$(CXX) $(CXXFLAGS) -c $< -o $@

$(EXECUTABLE): $(OBJECTS)
$(CXX) $(CXXFLAGS) $^ -o $@

$(OBJDIR):
mkdir -p $(OBJDIR)

.PHONY: clean
clean:
rm -rf $(OBJDIR) $(EXECUTABLE)
9 changes: 9 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <iostream>
#include "game.h"

int main()
{
TTT::Game game;
game.run();
return 0;
}

0 comments on commit 3fa6413

Please sign in to comment.