Rename libutil_com.c32 to libutil.c32
[syslinux/sherbszt.git] / mk / syslinux.mk
blob1378b6d5f73dd96ae18bf5be4dd4ca215c307cec
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.
11 ## -----------------------------------------------------------------------
14 ## Common configurables
17 # No builtin rules
18 MAKEFLAGS += -r
19 MAKE += -r
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
32 BOOTDIR = /boot
33 EXTLINUXDIR = $(BOOTDIR)/extlinux
35 NASM = nasm
36 NASMOPT = -Ox
38 PERL = perl
39 PYTHON = python
40 UPX = upx
42 CHMOD = chmod
44 CC = gcc
45 gcc_ok = $(shell tmpf=gcc_ok.$$$$.tmp; \
46 if $(CC) $(GCCOPT) $(1) -c $(topdir)/dummy.c \
47 -o $$tmpf 2>/dev/null ; \
48 then echo '$(1)'; else echo '$(2)'; fi; \
49 rm -f $$tmpf)
51 LD = ld
52 OBJDUMP = objdump
53 OBJCOPY = objcopy
54 STRIP = strip
55 AR = ar
56 NM = nm
57 RANLIB = ranlib
58 STRIP = strip
59 GZIPPROG = gzip
60 XZ = xz
61 PNGTOPNM = pngtopnm
62 MCOPY = mcopy
63 MFORMAT = mformat
64 MKISOFS = mkisofs
65 SED = sed
66 WGET = wget
68 com32 = $(topdir)/com32
70 # Common warnings we want for all gcc-generated code
71 GCCWARN := -W -Wall -Wstrict-prototypes
72 # Extremely useful variant for debugging...
73 #GCCWARN += -Wno-clobbered -Werror
75 # Common stanza to make gcc generate .*.d dependency files
76 MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d
78 # Dependencies that exclude system headers; use whenever we use
79 # header files from the platform.
80 UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d
82 # Items that are only appropriate during development; this file is
83 # removed when tarballs are generated.
84 -include $(MAKEDIR)/devel.mk
86 # Local additions, like -DDEBUG can go here
87 -include $(MAKEDIR)/local.mk