1## -*- makefile -*- ------------------------------------------------------- 2## 3## Copyright 2008 H. Peter Anvin - All Rights Reserved 4## 5## This program is free software; you can redistribute it and/or modify 6## it under the terms of the GNU General Public License as published by 7## the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 8## Boston MA 02110-1301, USA; either version 2 of the License, or 9## (at your option) any later version; incorporated herein by reference. 10## 11## ----------------------------------------------------------------------- 12 13## 14## Common configurables 15## 16 17# No builtin rules 18MAKEFLAGS += -r 19MAKE += -r 20 21BINDIR = /usr/bin 22SBINDIR = /sbin 23LIBDIR = /usr/lib 24DATADIR = /usr/share 25AUXDIR = $(DATADIR)/syslinux 26MANDIR = /usr/man 27INCDIR = /usr/include 28TFTPBOOT = /tftpboot 29COM32DIR = $(AUXDIR)/com32 30 31BOOTDIR = /boot 32EXTLINUXDIR = $(BOOTDIR)/extlinux 33 34NASM = nasm 35NASMOPT = -O9999 36 37PERL = perl 38 39CHMOD = chmod 40 41CC = gcc 42gcc_ok = $(shell tmpf=gcc_ok.$$$$.tmp; \ 43 if $(CC) $(1) -c $(topdir)/dummy.c -o $$tmpf 2>/dev/null ; \ 44 then echo '$(1)'; else echo '$(2)'; fi; \ 45 rm -f $$tmpf) 46 47LD = ld 48OBJDUMP = objdump 49OBJCOPY = objcopy 50AR = ar 51NM = nm 52RANLIB = ranlib 53GZIPPROG = gzip 54PNGTOPNM = pngtopnm 55MCOPY = mcopy 56MFORMAT = mformat 57MKISOFS = mkisofs 58SED = sed 59WGET = wget 60 61com32 = $(topdir)/com32 62 63# Common warnings we want for all gcc-generated code 64GCCWARN := -W -Wall -Wstrict-prototypes 65# Extremely useful variant for debugging... 66#GCCWARN += -Wno-clobbered -Werror 67 68# Common stanza to make gcc generate .*.d dependency files 69MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d 70 71# Dependencies that exclude system headers; use whenever we use 72# header files from the platform. 73UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d 74

