Skip to content

Commit

Permalink
Fix build info fix.
Browse files Browse the repository at this point in the history
Previous fix broke whole make command, so that's fixed now.
  • Loading branch information
ilia3101 authored Jul 17, 2017
1 parent 95c636c commit 7a6a3ca
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions platform/cocoa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
rm $(appname) $(objects)

0 comments on commit 7a6a3ca

Please sign in to comment.