initial import
[wyse_ntpd.git] / src / syslinux-5.10 / mk / syslinux.mk
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 ifdef DEBUG
36 # This allows DEBUGOPT to be set from the command line
37 DEBUGOPT = -DDEBUG=$(DEBUG)
38 endif
39
40 NASM     = nasm
41 NASMOPT  = -Ox $(DEBUGOPT)
42
43 PERL     = perl
44 PYTHON   = python
45 UPX      = upx
46
47 CHMOD    = chmod
48
49 CC       = gcc -m32
50 gcc_ok   = $(shell tmpf=gcc_ok.$$$$.tmp; \
51                    if $(CC) $(GCCOPT) $(1) -c $(topdir)/dummy.c \
52                         -o $$tmpf 2>/dev/null ; \
53                    then echo '$(1)'; else echo '$(2)'; fi; \
54                    rm -f $$tmpf)
55
56 LD       = ld
57 OBJDUMP  = objdump
58 OBJCOPY  = objcopy
59 STRIP    = strip
60 AR       = ar
61 NM       = nm
62 RANLIB   = ranlib
63 STRIP    = strip
64 GZIPPROG = gzip
65 XZ       = xz
66 PNGTOPNM = pngtopnm
67 MCOPY    = mcopy
68 MFORMAT  = mformat
69 MKISOFS  = mkisofs
70 SED      = sed
71 WGET     = wget
72
73 com32    = $(topdir)/com32
74
75 # Common warnings we want for all gcc-generated code
76 GCCWARN  = -W -Wall -Wstrict-prototypes $(DEBUGOPT)
77
78 # Common stanza to make gcc generate .*.d dependency files
79 MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d
80
81 # Dependencies that exclude system headers; use whenever we use
82 # header files from the platform.
83 UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d
84
85 # Items that are only appropriate during development; this file is
86 # removed when tarballs are generated.
87 -include $(MAKEDIR)/devel.mk
88
89 # Local additions, like -DDEBUG can go here
90 -include $(MAKEDIR)/local.mk