# Alternative GNU Make project makefile autogenerated by Premake ifndef config config=release endif ifndef verbose SILENT = @ endif .PHONY: clean prebuild SHELLTYPE := posix ifeq (.exe,$(findstring .exe,$(ComSpec))) SHELLTYPE := msdos endif # Configurations # ############################################# RESCOMP = windres TARGETDIR = bin/Release TARGET = $(TARGETDIR)/Pong OBJDIR = obj DEFINES += INCLUDES += FORCE_INCLUDE += ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Og -std=c99 -g -ggdb `pkg-config --cflags raylib` `pkg-config --cflags glfw3` `pkg-config --cflags gl` `pkg-config --cflags sdl2` `pkg-config --cflags SDL2_mixer` `pkg-config --cflags glu` ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Og -g -ggdb `pkg-config --cflags raylib` `pkg-config --cflags glfw3` `pkg-config --cflags gl` `pkg-config --cflags sdl2` `pkg-config --cflags SDL2_mixer` `pkg-config --cflags glu` ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES) LIBS += LDDEPS += ALL_LDFLAGS += $(LDFLAGS) -s -g -ggdb `pkg-config --libs raylib` `pkg-config --libs glfw3` `pkg-config --libs gl` `pkg-config --libs sdl2` `pkg-config --libs SDL2_mixer` `pkg-config --libs glu` LINKCMD = $(CC) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS) define PREBUILDCMDS endef define PRELINKCMDS endef define POSTBUILDCMDS endef # Per File Configurations # ############################################# # File sets # ############################################# GENERATED := OBJECTS := GENERATED += $(OBJDIR)/ball.o GENERATED += $(OBJDIR)/controls.o GENERATED += $(OBJDIR)/enemy.o GENERATED += $(OBJDIR)/main.o GENERATED += $(OBJDIR)/marathon.o GENERATED += $(OBJDIR)/pause.o GENERATED += $(OBJDIR)/title.o GENERATED += $(OBJDIR)/versus.o OBJECTS += $(OBJDIR)/ball.o OBJECTS += $(OBJDIR)/controls.o OBJECTS += $(OBJDIR)/enemy.o OBJECTS += $(OBJDIR)/main.o OBJECTS += $(OBJDIR)/marathon.o OBJECTS += $(OBJDIR)/pause.o OBJECTS += $(OBJDIR)/title.o OBJECTS += $(OBJDIR)/versus.o # Rules # ############################################# all: $(TARGET) @: $(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR) $(PRELINKCMDS) @echo Linking Pong $(SILENT) $(LINKCMD) $(POSTBUILDCMDS) $(TARGETDIR): @echo Creating $(TARGETDIR) ifeq (posix,$(SHELLTYPE)) $(SILENT) mkdir -p $(TARGETDIR) else $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) endif $(OBJDIR): @echo Creating $(OBJDIR) ifeq (posix,$(SHELLTYPE)) $(SILENT) mkdir -p $(OBJDIR) else $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) endif clean: @echo Cleaning Pong ifeq (posix,$(SHELLTYPE)) $(SILENT) rm -f $(TARGET) $(SILENT) rm -rf $(GENERATED) $(SILENT) rm -rf $(OBJDIR) else $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) $(SILENT) if exist $(subst /,\\,$(GENERATED)) rmdir /s /q $(subst /,\\,$(GENERATED)) $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) endif prebuild: | $(OBJDIR) $(PREBUILDCMDS) ifneq (,$(PCH)) $(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER) $(GCH): $(PCH) | prebuild @echo $(notdir $<) $(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<" $(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR) ifeq (posix,$(SHELLTYPE)) $(SILENT) touch "$@" else $(SILENT) echo $null >> "$@" endif else $(OBJECTS): | prebuild endif # File Rules # ############################################# $(OBJDIR)/ball.o: src/ball.c @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" $(OBJDIR)/controls.o: src/controls.c @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" $(OBJDIR)/enemy.o: src/enemy.c @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" $(OBJDIR)/main.o: src/main.c @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" $(OBJDIR)/marathon.o: src/marathon.c @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" $(OBJDIR)/pause.o: src/pause.c @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" $(OBJDIR)/title.o: src/title.c @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" $(OBJDIR)/versus.o: src/versus.c @echo $(notdir $<) $(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" -include $(OBJECTS:%.o=%.d) ifneq (,$(PCH)) -include $(PCH_PLACEHOLDER).d endif