diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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) |