Optimizing Your Makefile C Flags for different OS
There is a different setup for differents OS:
# Linux defaults:
prefix = /usr
CC=gcc
#CFLAGS=-ggdb -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
CFLAGS=-O2 -Wall -fomit-frame-pointer -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
LDFLAGS=-s
TREE_DEST=tree
MANDIR=${prefix}/man/man1
VERSION=1.5.2.2
BINDIR=${prefix}/bin
MAN=tree.1
# Uncomment for FreeBSD:
prefix = /usr
CC=gcc
CFLAGS=-O2 -Wall -fomit-frame-pointer
LDFLAGS=-s
TREE_DEST=tree
XOBJS=strverscmp.o
MANDIR=${prefix}/man/man1
VERSION=1.5.2.2
BINDIR=${prefix}/bin
MAN=tree.1
# Uncomment for Solaris:
prefix = /usr
CC=cc
CFLAGS=-xO0 -v
LDFLAGS=
TREE_DEST=tree
XOBJS=strverscmp.o
MANDIR=${prefix}/share/man/man1
VERSION=1.5.2.2
BINDIR=${prefix}/bin
MAN=tree.1
# Uncomment for Cygwin:
prefix = /usr
CC=gcc
CFLAGS=-O2 -Wall -fomit-frame-pointer -DCYGWIN
LDFLAGS=-s
TREE_DEST=tree.exe
XOBJS=strverscmp.o
MANDIR=${prefix}/man/man1
VERSION=1.5.2.2
BINDIR=${prefix}/bin
MAN=tree.1
# Uncomment for OS X:
prefix = /usr
CC=cc
CFLAGS=-O2 -Wall -fomit-frame-pointer -no-cpp-precomp
LDFLAGS=
TREE_DEST=tree
XOBJS=strverscmp.o
MANDIR=${prefix}/man/man1
VERSION=1.5.2.2
BINDIR=${prefix}/bin
MAN=tree.1
# Uncomment for HP/UX:
prefix = /usr
CC=cc
CFLAGS=-Ae +O2 +DAportable -Wall
LDFLAGS=
TREE_DEST=tree
XOBJS=strverscmp.o
MANDIR=${prefix}/man/man1
VERSION=1.5.2.2
BINDIR=${prefix}/bin
MAN=tree.1
# Uncomment for OS/2:
prefix = /usr
CC=gcc
CFLAGS=-02 -Wall -fomit-frame-pointer -Zomf -Zsmall-conv
LDFLAGS=-s -Zomf -Zsmall-conv
TREE_DEST=tree
XOBJS=strverscmp.o
MANDIR=${prefix}/man/man1
VERSION=1.5.2.2
BINDIR=${prefix}/bin
MAN=tree.1
# Uncomment for HP NonStop:
prefix = /opt
CC=c89
CFLAGS=-Wextensions -WIEEE_float -g -Wnowarn=1506 -D_XOPEN_SOURCE_EXTENDED=1 -Wallow_cplusplus_comments
LDFLAGS=
TREE_DEST=tree
MANDIR=${prefix}/man/man1
VERSION=1.5.2.2
BINDIR=${prefix}/bin
MAN=tree.1
No comments:
Post a Comment