Skip to content

Commit

Permalink
Add makefiles for msys/mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed Aug 5, 2023
1 parent bbb7bb8 commit faca135
Show file tree
Hide file tree
Showing 6 changed files with 409 additions and 11 deletions.
4 changes: 2 additions & 2 deletions build-Darwin/bake.make
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ifeq ($(config),debug)
DEFINES += -DBAKE_IMPL -DDEBUG
INCLUDES += -I../include -I../util/include
FORCE_INCLUDE +=
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
ALL_CPPFLAGS += $(CPPFLAGS) -MD -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -std=c99 -fPIC -D_XOPEN_SOURCE=600
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -std=c99 -fPIC -D_XOPEN_SOURCE=600
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
Expand Down Expand Up @@ -61,7 +61,7 @@ ifeq ($(config),release)
DEFINES += -DBAKE_IMPL -DNDEBUG
INCLUDES += -I../include -I../util/include
FORCE_INCLUDE +=
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
ALL_CPPFLAGS += $(CPPFLAGS) -MD -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O2 -std=c99 -fPIC -D_XOPEN_SOURCE=600
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O2 -std=c99 -fPIC -D_XOPEN_SOURCE=600
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
Expand Down
4 changes: 2 additions & 2 deletions build-Linux/bake.make
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ifeq ($(config),debug)
DEFINES += -DBAKE_IMPL -DDEBUG
INCLUDES += -I../include -I../util/include
FORCE_INCLUDE +=
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
ALL_CPPFLAGS += $(CPPFLAGS) -MD -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -std=c99 -fPIC -D_XOPEN_SOURCE=600
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -std=c99 -fPIC -D_XOPEN_SOURCE=600
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
Expand All @@ -45,7 +45,7 @@ ifeq ($(config),release)
DEFINES += -DBAKE_IMPL -DNDEBUG
INCLUDES += -I../include -I../util/include
FORCE_INCLUDE +=
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
ALL_CPPFLAGS += $(CPPFLAGS) -MD -MP $(DEFINES) $(INCLUDES)
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O2 -std=c99 -fPIC -D_XOPEN_SOURCE=600
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O2 -std=c99 -fPIC -D_XOPEN_SOURCE=600
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
Expand Down
48 changes: 48 additions & 0 deletions build-Mingw/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Alternative GNU Make workspace makefile autogenerated by Premake

ifndef config
config=debug
endif

ifndef verbose
SILENT = @
endif

ifeq ($(config),debug)
bake_config = debug

else ifeq ($(config),release)
bake_config = release

else
$(error "invalid configuration $(config)")
endif

PROJECTS := bake

.PHONY: all clean help $(PROJECTS)

all: $(PROJECTS)

bake:
ifneq (,$(bake_config))
@echo "==== Building bake ($(bake_config)) ===="
@${MAKE} --no-print-directory -C . -f bake.make config=$(bake_config)
endif

clean:
@${MAKE} --no-print-directory -C . -f bake.make clean

help:
@echo "Usage: make [config=name] [target]"
@echo ""
@echo "CONFIGURATIONS:"
@echo " debug"
@echo " release"
@echo ""
@echo "TARGETS:"
@echo " all (default)"
@echo " clean"
@echo " bake"
@echo ""
@echo "For more information, see https://github.com/premake/premake-core/wiki"
Loading

0 comments on commit faca135

Please sign in to comment.