From 7a6a3cadd082897b6a3061684550f312f1e73209 Mon Sep 17 00:00:00 2001 From: Ilia Sibiryakov Date: Mon, 17 Jul 2017 19:14:44 +0100 Subject: [PATCH] Fix build info fix. Previous fix broke whole make command, so that's fixed now. --- platform/cocoa/Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/platform/cocoa/Makefile b/platform/cocoa/Makefile index e328fd1d..18792026 100644 --- a/platform/cocoa/Makefile +++ b/platform/cocoa/Makefile @@ -14,14 +14,18 @@ mainflags = -O3 -Ofast -m64 linkflags = $(mainflags) -mmacosx-version-min=10.6 -lm -pthread cflags := $(mainflags) -c -mmacosx-version-min=10.6 -# Link all objects with main flags -# Running some cheeky compiletime code to generate window title with hostname -main : $(objects) +# Run some cheeky compiletime code to generate window title with hostname +# Then call the build rule to actually build it +main : $(CC) compile_time_code.c -o compile_time_code; \ ./compile_time_code; \ - $(CC) $(mainflags) $(objects) -o $(appname) -framework Cocoa; \ + make build; \ rm compile_time_code; \ - rm app_window_title.h; + rm app_window_title.h + +# Actual linking and compiling happens here +build : $(objects) + $(CC) $(mainflags) $(objects) -o $(appname) -framework Cocoa; # Making all objects... main.o : main.m @@ -64,4 +68,4 @@ bitmap.o : ../../src/imageio/bitmap/bitmap.c # Type 'make clean' to remove mess .PHONY : clean clean : # Removes the program and object files - rm $(appname) $(objects) \ No newline at end of file + rm $(appname) $(objects)