Created
December 30, 2011 14:20
-
-
Save mharju/1540062 to your computer and use it in GitHub Desktop.
Makefile for Ibniz (http://pelulamu.net/ibniz/) for use with OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy SDLmain.m and SDLmain.h from the SDL DMG to the same directory | |
# To get decent framerates edit line 171 on ui_sdl.c and enter | |
# return SDL_GetTicks() / 3; | |
# ( source for that trick: http://lgo900.wordpress.com/2011/12/25/running-ibniz-on-mac-os-x/ ) | |
CC=gcc | |
EXE=ibniz | |
LFLAGS=-framework SDL -framework Cocoa | |
FLAGS=-I/Library/Frameworks/SDL.Framework/Headers | |
all: ibniz | |
clean: | |
rm -f *.o *~ ibniz vmtest ibniz.exe | |
package: clean | |
cd .. && tar czf ibniz-1.1.tar.gz ibniz-1.1/ | |
$(EXE): ui_sdl.o vm_slow.o clipboard.o | |
$(CC) $(FLAGS) -Os ui_sdl.o vm_slow.o clipboard.o SDLmain.m -o $(EXE) $(LFLAGS) -lm | |
ui_sdl.o: ui_sdl.c ibniz.h font.i vm.h texts.i | |
$(CC) -c -Os ui_sdl.c -o ui_sdl.o $(FLAGS) | |
clipboard.o: clipboard.c ibniz.h | |
$(CC) -c -Os clipboard.c -o clipboard.o $(FLAGS) | |
vm_slow.o: vm_slow.c ibniz.h vm.h | |
$(CC) -c -O3 vm_slow.c -o vm_slow.o | |
font.i: font.pl | |
perl font.pl > font.i | |
runtest: vmtest | |
./vmtest | |
vmtest: vm_test.c vm_slow.c | |
gcc vm_test.c vm_slow.c -o vmtest -lm | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment