-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win64: experimental Win64 installer (syslinux64.exe)
Experimental Win64 installer. This is necessary to be able to run on WinPE64, since WinPE64 doesn't support running 32-bit binaries. Signed-off-by: H. Peter Anvin <[email protected]>
- Loading branch information
H. Peter Anvin
committed
Jul 21, 2010
1 parent
a6616dc
commit 4ad6696
Showing
11 changed files
with
148 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ cc="$1" | |
|
||
for prefix in \ | ||
mingw- \ | ||
mingw32- \ | ||
i386-pc-mingw32- \ | ||
i486-pc-mingw32- \ | ||
i586-pc-mingw32- \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
## ----------------------------------------------------------------------- | ||
## | ||
## Copyright 1998-2008 H. Peter Anvin - All Rights Reserved | ||
## Copyright 2010 Intel Corporation; author: H. Peter Anvin | ||
## | ||
## This program is free software; you can redistribute it and/or modify | ||
## it under the terms of the GNU General Public License as published by | ||
## the Free Software Foundation, Inc., 53 Temple Place Ste 330, | ||
## Boston MA 02111-1307, USA; either version 2 of the License, or | ||
## (at your option) any later version; incorporated herein by reference. | ||
## | ||
## ----------------------------------------------------------------------- | ||
|
||
# | ||
# Makefile for SYSLINUX Win64 | ||
# | ||
# This is separated out mostly so we can have a different set of Makefile | ||
# variables. | ||
# | ||
|
||
OSTYPE = $(shell uname -msr) | ||
# Don't know how to do a native compile here... | ||
WINPREFIX := $(shell ./find-mingw64.sh gcc) | ||
WINCFLAGS := $(GCCWARN) -Wno-sign-compare -Os -fomit-frame-pointer \ | ||
-D_FILE_OFFSET_BITS=64 | ||
WINLDFLAGS := -Os -s | ||
|
||
WINCFLAGS += -I. -I../win -I.. -I../libfat -I../libinstaller \ | ||
-I../libinstaller/getopt | ||
|
||
WINCC := $(WINPREFIX)gcc | ||
WINAR := $(WINPREFIX)ar | ||
WINRANLIB := $(WINPREFIX)ranlib | ||
|
||
WINCC_IS_GOOD := $(shell $(WINCC) $(WINCFLAGS) $(WINLDFLAGS) \ | ||
-o hello.exe ../win/hello.c >/dev/null 2>&1 ; echo $$?) | ||
|
||
.SUFFIXES: .c .obj .lib .exe .i .s .S | ||
|
||
SRCS = ../win/syslinux.c | ||
OBJS = $(patsubst %.c,%.obj,$(notdir $(SRCS))) | ||
LIBSRC = ../libinstaller/fat.c \ | ||
../libinstaller/syslxmod.c \ | ||
../libinstaller/syslxopt.c \ | ||
../libinstaller/setadv.c \ | ||
../libinstaller/getopt/getopt_long.c \ | ||
../libinstaller/bootsect_bin.c \ | ||
../libinstaller/ldlinux_bin.c \ | ||
../libinstaller/mbr_bin.c \ | ||
$(wildcard ../libfat/*.c) | ||
LIBOBJS = $(patsubst %.c,%.obj,$(notdir $(LIBSRC))) | ||
|
||
LIB = syslinux.lib | ||
|
||
VPATH = .:../win:../libfat:../libinstaller:../libinstaller/getopt | ||
|
||
TARGETS = syslinux64.exe | ||
|
||
ifeq ($(WINCC_IS_GOOD),0) | ||
all: $(TARGETS) | ||
else | ||
all: | ||
rm -f $(TARGETS) | ||
endif | ||
|
||
tidy dist: | ||
-rm -f *.o *.obj *.lib *.i *.s *.a .*.d *.tmp *_bin.c hello.exe | ||
|
||
clean: tidy | ||
|
||
spotless: clean | ||
-rm -f *~ $(TARGETS) | ||
|
||
installer: | ||
|
||
$(LIB): $(LIBOBJS) | ||
rm -f $@ | ||
$(WINAR) cq $@ $^ | ||
$(WINRANLIB) $@ | ||
|
||
syslinux64.exe: $(OBJS) $(LIB) | ||
$(WINCC) $(WINLDFLAGS) -o $@ $^ | ||
|
||
|
||
%.obj: %.c | ||
$(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -c -o $@ $< | ||
%.i: %.c | ||
$(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -E -o $@ $< | ||
%.s: %.c | ||
$(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -S -o $@ $< | ||
|
||
-include .*.d *.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Building the Win64 installer requires the MinGW-W64 compiler, | ||
available at: | ||
|
||
http://mingw-w64.sourceforge.net/ | ||
|
||
For prepackaged versions of the MinGW-W64 cross-compiler for the | ||
Fedora Linux distribution (and possibly other RPM-based | ||
distributions), see: | ||
|
||
http://lists.fedoraproject.org/pipermail/mingw/2010-May/002589.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
|
||
cc="$1" | ||
|
||
for prefix in \ | ||
mingw64- \ | ||
x86_64-pc-mingw64- \ | ||
x86_64-pc-mingw64msvc- \ | ||
x86_64-pc-mingw32- \ | ||
x86_64-pc-mingw32msvc- \ | ||
x86_64-mingw64- \ | ||
x86_64-mingw64msvc- \ | ||
x86_64-mingw32- \ | ||
x86_64-mingw32msvc- \ | ||
; do | ||
if "${prefix}${cc}" -v > /dev/null 2>&1; then | ||
echo "$prefix" | ||
exit 0 | ||
fi | ||
done | ||
|
||
# No prefix, no idea what to do now... | ||
echo missing- | ||
exit 1 |