1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-26 08:41:47 -07:00
emacs/mps/code/gc.gmk
Nick Barnes 88e5e63275 Branch imports for masters.
Copied from Perforce
 Change: 23678
 ServerID: perforce.ravenbrook.com
2001-10-31 14:40:56 +00:00

30 lines
981 B
Text

# impl.gmk.gc: GNUMAKEFILE FRAGMENT FOR GNU CC
#
# $HopeName: MMsrc!gc.gmk(trunk.25) $
# Copyright (C) 2000 Harlequin Limited. All rights reserved.
#
# This file is included by platform makefiles that use the GNU CC
# compiler. It defines the compiler-specific variables that the
# common makefile fragment (impl.gmk.comm) requires.
CC = gcc
CFLAGSCOMPILER := \
-ansi -pedantic -Wall -Werror -Wpointer-arith \
-Wstrict-prototypes -Wmissing-prototypes \
-Winline -Waggregate-return -Wnested-externs \
-Wcast-qual -Wshadow
CFLAGSDEBUG = -g -ggdb3
CFLAGSOPT = -O -g -ggdb3
CFLAGSOPTNODEBUG = -O -g0
# gcc -MM generates a dependency line of the form:
# thing.o : thing.c ...
# The sed line converts this into:
# <pfm>/<variety>/thing.o <pfm>/<variety>/thing.d : thing.c ...
# If interrupted, this is liable to leave a zero-length file behind.
define gendep
$(SHELL) -ec "$(CC) $(CFLAGS) -MM $< | \
sed '/:/s!$*.o!$(@D)/& $(@D)/$*.d!' > $@"
[ -s $@ ] || rm -f $@
endef