diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-06 18:15:33 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-06 18:15:33 +0800 |
commit | 029bfc6493cd2134728b6b5280391aba8dd0d0df (patch) | |
tree | b5cb39d4791b363ed663b75007ff44344ebb0a16 /pttbbs.mk | |
parent | d8f00661e5f3eb46ec9f791506916ae5de983ca9 (diff) | |
download | pttbbs-029bfc6493cd2134728b6b5280391aba8dd0d0df.tar pttbbs-029bfc6493cd2134728b6b5280391aba8dd0d0df.tar.gz pttbbs-029bfc6493cd2134728b6b5280391aba8dd0d0df.tar.bz2 pttbbs-029bfc6493cd2134728b6b5280391aba8dd0d0df.tar.lz pttbbs-029bfc6493cd2134728b6b5280391aba8dd0d0df.tar.xz pttbbs-029bfc6493cd2134728b6b5280391aba8dd0d0df.tar.zst pttbbs-029bfc6493cd2134728b6b5280391aba8dd0d0df.zip |
PROFILING support
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1708 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'pttbbs.mk')
-rw-r--r-- | pttbbs.mk | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -28,15 +28,27 @@ PTT_CFLAGS+= $(CFLAGS_$(OSTYPE)) PTT_LDFLAGS+= $(LDFLAGS_$(OSTYPE)) PTT_LIBS+= $(LIBS_$(OSTYPE)) +# 若有定義 PROFILING +.if defined(PROFILING) +PTT_CFLAGS+= -pg +PTT_LDFLAGS+= -pg +NO_OMITFP= yes +NO_FORK= yes +.endif + # 若有定義 GDB或 DEBUG, 則加入 -g , 否則用 -O .if defined(GDB) || defined(DEBUG) CFLAGS= -g $(PTT_CFLAGS) LDFLAGS= -g $(PTT_LDFLAGS) $(PTT_LIBS) .else -CFLAGS+= -Os -fomit-frame-pointer -fstrength-reduce \ +CFLAGS+= -Os -fstrength-reduce \ -fthread-jumps -fexpensive-optimizations \ - $(PTT_CFLAGS) + $(PTT_CFLAGS) $(EXT_CFLAGS) LDFLAGS+= -Os $(PTT_LDFLAGS) $(PTT_LIBS) + +.if !defined(NO_OMITFP) +CFLAGS+= -fomit-frame-pointer +.endif .endif # 若有定義 DEBUG, 則在 CFLAGS內定義 DEBUG |