X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=Makefile;h=c454140a7340440a20b7b3e523423fbf3c475eec;hb=2323b0b12d2a9f247734cffae61de0a68fd59f84;hp=fe1e34a88d961739473677270684320cc8d961bb;hpb=065f63e66da877e54405052f6d64359c78ddfe18;p=shadowclad.git diff --git a/Makefile b/Makefile index fe1e34a..c454140 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ -PLATFORM ?= x86_64-linux-gnu +#PLATFORM ?= x86_64-linux-gnu +PLATFORM ?= x86_64-w64-mingw32 + +CC ::= x86_64-w64-mingw32-cc BUILDDIR ?= target/$(PLATFORM) SRCDIR ?= src @@ -7,7 +10,7 @@ CPPFLAGS ::= -iquotesrc/ $(CPPFLAGS) CFLAGS ::= -g -std=c99 -Wall -Wextra -Wpedantic -Werror \ -Wno-error=unused-function -Wno-error=unused-parameter $(CFLAGS) LDFLAGS ::= $(LDFLAGS) -LDLIBS ::= -lm -lGL -lGLEW -lglut -lassimp $(LDLIBS) +LDLIBS ::= -L/usr/x86_64-w64-mingw32/bin -lm -lopengl32 -lglew32 -lglfw3 -lassimp $(LDLIBS) # ###### # Paths @@ -15,13 +18,18 @@ LDLIBS ::= -lm -lGL -lGLEW -lglut -lassimp $(LDLIBS) sources ::= main.c \ engine/asset.c \ + engine/engine.c \ engine/geometry.c \ + engine/input.c \ engine/logger.c \ engine/performance.c \ engine/render.c \ engine/scene.c \ + engine/string.c \ engine/tga.c \ engine/ui.c \ + game/game.c \ + game/input.c \ game/level.c \ game/player.c @@ -37,7 +45,8 @@ depfiles ::= $(addprefix $(BUILDDIR)/, $(addsuffix .mk, $(srcfiles))) #else # binext ::= #endif -binary ::= $(BUILDDIR)/shadowclad #$(binext) +binary ::= $(BUILDDIR)/shadowclad.exe +#binary ::= $(BUILDDIR)/shadowclad #$(binext) # ###### # Main build rules @@ -47,7 +56,7 @@ binary ::= $(BUILDDIR)/shadowclad #$(binext) $(binary): $(objects) @mkdir -p $(@D) @echo "Linking executable" - @$(CC) $(LDFLAGS) -o $(binary) $^ $(LOADLIBES) $(LDLIBS) + $(CC) $(LDFLAGS) -o $(binary) $^ $(LOADLIBES) $(LDLIBS) # Build C translation units $(objects): $(BUILDDIR)/%.c.o: %.c $(BUILDDIR)/%.c.mk