diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2021-03-04 11:35:53 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2021-03-04 11:35:53 +0300 |
commit | e6eff4a5c27ffb4a44aa68b6364af4ea07efc610 (patch) | |
tree | 47f4a55c49e6b63d9d981fe2a33bb4e0c2f8e8b1 /Makefile | |
parent | c50f068782fc0ef4f653710d872dc7161022e9c3 (diff) | |
download | takethis-e6eff4a5c27ffb4a44aa68b6364af4ea07efc610.tar takethis-e6eff4a5c27ffb4a44aa68b6364af4ea07efc610.tar.xz takethis-e6eff4a5c27ffb4a44aa68b6364af4ea07efc610.zip |
Makefile fix.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -4,6 +4,8 @@ DEBUG ?= no # Specify your favourite C compiler here: COMPILE ?= gcc +# Are you on Windows? +WINDOWS ?= no # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @@ -16,8 +18,11 @@ CFLAGS += -g -O0 else CFLAGS += -O2 endif +ifeq '$(WINDOWS)' 'yes' +LFLAGS = -mwindows -lmingw32 +endif # Use SDL: -LFLAGS = -lSDL2 -lSDL2_ttf -lSDL2_mixer -lm +LFLAGS += -lSDL2main -lSDL2 -lSDL2_ttf -lSDL2_mixer -lm # Directories definitions: BUILD = build @@ -49,7 +54,7 @@ clean: # Packing object files into library: $(GAME): $(OBJ) - $(COMPILE) $(LFLAGS) $^ -o $@ + $(COMPILE) -o $@ $^ $(LFLAGS) # Compile object files from corresponding source: $(BUILD)/%.o: $(SRCDIR)/%.c |