summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2022-11-29 18:19:25 +0100
committerEkaitz Zarraga <ekaitz@elenq.tech>2022-11-29 18:19:25 +0100
commitbf34d835e4ea49bd4ef2e5de2b1fea2fd3c95adc (patch)
treeb1970daefeb7a6a8f406c83126de49c3b928484e /Makefile
parentcbf859a37aa6b16db7e53cf75405cda720617392 (diff)
Start to use a normal game structure:
- App class that has a StateStack - StateStack - Some State definiton and a minimal TitleState to use as a template - Makefile updated accordingly - Delete old code that was there for testing
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 47549f6..51ab372 100644
--- a/Makefile
+++ b/Makefile
@@ -14,11 +14,14 @@ OBJS = $(addsuffix .o, $(addprefix $(OBJDIR)/, $(BASENM)) )
GRAPHICS_BASENM = $(notdir $(basename $(wildcard src/graphics/*.cpp)))
GRAPHICS_OBJS = $(addsuffix .o, $(addprefix $(OBJDIR)/graphics/, $(GRAPHICS_BASENM)) )
+STATES_BASENM = $(notdir $(basename $(wildcard src/states/*.cpp)))
+STATES_OBJS = $(addsuffix .o, $(addprefix $(OBJDIR)/states/, $(STATES_BASENM)) )
+
all: $(TARGET)
-$(TARGET): $(OBJS) $(GRAPHICS_OBJS)
+$(TARGET): $(OBJS) $(GRAPHICS_OBJS) $(STATES_OBJS)
echo $(GRAPHICS_OBJS)
- $(CC) $(OBJS) $(GRAPHICS_OBJS) -o $(TARGET) $(LIBS)
+ $(CC) $(OBJS) $(GRAPHICS_OBJS) $(STATES_OBJS) -o $(TARGET) $(LIBS)
$(OBJS): $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
mkdir -p $(OBJDIR)
@@ -28,6 +31,10 @@ $(GRAPHICS_OBJS): $(OBJDIR)/graphics/%.o: $(SRCDIR)/graphics/%.cpp
mkdir -p $(OBJDIR)/graphics/
$(CC) $(CFLAGS) -o $@ -c $<
+$(STATES_OBJS): $(OBJDIR)/states/%.o: $(SRCDIR)/states/%.cpp
+ mkdir -p $(OBJDIR)/states/
+ $(CC) $(CFLAGS) -o $@ -c $<
+
clean:
rm -r $(OBJDIR) $(TARGET)