Initial code release
[external/syslinux.git] / MCONFIG
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
18 MAKEFLAGS += -r
19 MAKE      += -r
20
21 BINDIR   = /usr/bin
22 SBINDIR  = /sbin
23 LIBDIR   = /usr/lib
24 DATADIR  = /usr/share
25 AUXDIR   = $(DATADIR)/syslinux
26 DIAGDIR  = $(AUXDIR)/diag
27 MANDIR   = /usr/man
28 INCDIR   = /usr/include
29 TFTPBOOT = /tftpboot
30 COM32DIR = $(AUXDIR)/com32
31
32 BOOTDIR     = /boot
33 EXTLINUXDIR = $(BOOTDIR)/extlinux
34
35 NASM     = nasm
36 NASMOPT  = -Ox
37
38 PERL     = perl
39 UPX      = upx
40
41 CHMOD    = chmod
42
43 CC       = gcc
44 gcc_ok   = $(shell tmpf=gcc_ok.$$$$.tmp; \
45                    if $(CC) $(GCCOPT) $(1) -c $(topdir)/dummy.c \
46                         -o $$tmpf 2>/dev/null ; \
47                    then echo '$(1)'; else echo '$(2)'; fi; \
48                    rm -f $$tmpf)
49
50 LD       = ld
51 OBJDUMP  = objdump
52 OBJCOPY  = objcopy
53 AR       = ar
54 NM       = nm
55 RANLIB   = ranlib
56 GZIPPROG = gzip
57 PNGTOPNM = pngtopnm
58 MCOPY    = mcopy
59 MFORMAT  = mformat
60 MKISOFS  = mkisofs
61 SED      = sed
62 WGET     = wget
63
64 com32    = $(topdir)/com32
65
66 # Common warnings we want for all gcc-generated code
67 GCCWARN := -W -Wall -Wstrict-prototypes
68 # Extremely useful variant for debugging...
69 #GCCWARN += -Wno-clobbered -Werror
70
71 # Common stanza to make gcc generate .*.d dependency files
72 MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d
73
74 # Dependencies that exclude system headers; use whenever we use
75 # header files from the platform.
76 UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d
77
78 # Items that are only appropriate during development; this file is
79 # removed when tarballs are generated.
80 -include $(topdir)/MCONFIG.devel
81
82 # Local additions, like -DDEBUG can go here
83 -include $(topdir)/MCONFIG.local