Paste: Help for bsnes' makefile

Author: Screwtape
Mode: patch
Date: Sat, 14 Aug 2010 06:03:51
Plain Text |
diff --git a/Makefile b/Makefile
index 5a4406a..aa48698 100755
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,8 @@ ui := qt
 # compiler
 c       := $(compiler) -std=gnu99
 cpp     := $(subst cc,++,$(compiler)) -std=gnu++0x
-flags   := -O3 -fomit-frame-pointer -I. -I$(snes)
+extraflags :=
+flags   := -O3 -fomit-frame-pointer -I. -I$(snes) $(extraflags)
 link    :=
 objects :=
 
@@ -89,4 +90,38 @@ clean: ui_clean
 archive-all:
    tar -cjf bsnes-`date +%Y%m%d`.tar.bz2 libco nall obj out qt ruby snes Makefi
 
-help:;
+help:
+   @echo "Build configuration:"
+   @echo "===================="
+   @echo
+   @echo "profile=research"
+   @echo "    The most accurate SNES emulator possible, but dog-slow."
+   @echo "profile=baseline"
+   @echo "    A good compromise between accuracy and performance"
+   @echo "profile=performance"
+   @echo "    Very fast, but causes known problems in a few games."
+   @echo
+   @echo "Current default is: $(profile)"
+   @echo
+   @echo "Profile-guided optimization"
+   @echo "==========================="
+   @echo
+   @echo "Run:"
+   @echo "    make link=-lgcov extraflags=-fprofile-generate"
+   @echo
+   @echo "Exercise the resulting binary, then run:"
+   @echo "    make extraflags=-fprofile-use"
+   @echo
+   @echo "Install configuration:"
+   @echo "======================"
+   @echo
+   @echo "prefix=SOMEPATH"
+   @echo "    "make install" copies bsnes into SOMEPATH"
+   @echo
+   @echo "Build targets"
+   @echo "============="
+   @echo
+   @echo "build:"
+   @echo "    Build the Qt GUI."
+   @echo "library:"
+   @echo "    Build the libsnes emulation DLL. Requires extraflags=-fPIC"

New Annotation

Summary:
Author:
Mode:
Body: