1 ## -----------------------------------------------------------------------
3 ## Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
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., 53 Temple Place Ste 330,
8 ## Boston MA 02111-1307, USA; either version 2 of the License, or
9 ## (at your option) any later version; incorporated herein by reference.
11 ## -----------------------------------------------------------------------
14 # Makefile for SYSLINUX Win32
16 # This is separated out mostly so we can have a different set of Makefile
20 OSTYPE
= $(shell uname
-msr
)
21 ifeq ($(findstring CYGWIN
,$(OSTYPE
)),CYGWIN
)
25 CFLAGS
= -mno-cygwin
-W
-Wall
-Os
-fomit-frame-pointer
-D_FILE_OFFSET_BITS
=64
27 LDFLAGS
= -mno-cygwin
-Os
-s
29 ifeq ($(findstring MINGW32
,$(OSTYPE
)),MINGW32
)
39 CFLAGS
= -W
-Wall
-Wno-sign-compare
-Os
-fomit-frame-pointer
-D_FILE_OFFSET_BITS
=64
43 CFLAGS
+= -I.
-I..
-I..
/libfat
45 CC_IS_GOOD
:= $(shell $(CC
) $(CFLAGS
) $(LDFLAGS
) -o hello.exe hello.c
>/dev
/null
2>&1 ; echo
$$?
)
47 .SUFFIXES
: .c .o .i .s .S
49 SRCS
= syslinux.c ..
/syslxmod.c ..
/bootsect_bin.c ..
/ldlinux_bin.c \
50 ..
/mbr_bin.c
$(wildcard ..
/libfat
/*.c
)
51 OBJS
= $(patsubst %.c
,%.o
,$(notdir $(SRCS
)))
53 VPATH
= .
:..
:..
/libfat
55 TARGETS
= syslinux.exe
57 ifeq ($(CC_IS_GOOD
),0)
65 -rm -f
*.o
*.i
*.s
*.a .
*.d
*_bin.c
75 $(CC
) $(LDFLAGS
) -o
$@
$^
79 $(CC
) -Wp
,-MT
,$@
,-MMD
,.
$@.d
$(CFLAGS
) -c
-o
$@
$<
81 $(CC
) $(CFLAGS
) -E
-o
$@
$<
83 $(CC
) $(CFLAGS
) -S
-o
$@
$<