loadfile: make sure we don't trash errno
[syslinux.git] / MCONFIG
blob09764c8c8510e9b339c5d1c33d106f6714927848
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 MANDIR   = /usr/man
27 INCDIR   = /usr/include
28 TFTPBOOT = /tftpboot
30 BOOTDIR     = /boot
31 EXTLINUXDIR = $(BOOTDIR)/extlinux
33 NASM     = nasm
34 NASMOPT  = -O9999
36 PERL     = perl
38 CC       = gcc
39 TMPFILE := $(shell mktemp /tmp/gcc_ok.XXXXXX)
40 gcc_ok   = $(shell tmpf=$(TMPFILE); \
41                    if $(CC) $(1) -c $(topdir)/dummy.c -o $$tmpf 2>/dev/null ; \
42                    then echo '$(1)'; else echo '$(2)'; fi; \
43                    rm -f $$tmpf)
45 LD       = ld
46 OBJDUMP  = objdump
47 OBJCOPY  = objcopy
48 AR       = ar
49 NM       = nm
50 RANLIB   = ranlib