root/win32/Makefile

Revision 966e23ecf875a0863636e6c5403b0c3ebaa3bdde, 2.7 KB (checked in by Paulo Alcantara <pcacjr@…>, 8 months ago)

win: Add further NTFS support to Windows installers

We have a way of building a map of the LDLINUX.SYS sectors
on an NTFS filesystem, now.

Signed-off-by: Paulo Alcantara <pcacjr@…>
Signed-off-by: Shao Miller <shao.miller@…>

  • Property mode set to 100644
Line 
1## -----------------------------------------------------------------------
2##
3##   Copyright 1998-2008 H. Peter Anvin - All Rights Reserved
4##   Copyright 2010 Intel Corporation; author: H. Peter Anvin
5##
6##   This program is free software; you can redistribute it and/or modify
7##   it under the terms of the GNU General Public License as published by
8##   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9##   Boston MA 02111-1307, USA; either version 2 of the License, or
10##   (at your option) any later version; incorporated herein by reference.
11##
12## -----------------------------------------------------------------------
13
14#
15# Makefile for SYSLINUX Win32
16#
17# This is separated out mostly so we can have a different set of Makefile
18# variables.
19#
20
21OSTYPE   = $(shell uname -msr)
22ifeq ($(findstring CYGWIN,$(OSTYPE)),CYGWIN)
23## Compiling on Cygwin
24WINPREFIX  :=
25WINCFLAGS  := -mno-cygwin $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
26WINLDFLAGS := -mno-cygwin -Os -s
27else
28## Compiling on some variant of MinGW
29ifeq ($(findstring MINGW32,$(OSTYPE)),MINGW32)
30WINPREFIX  :=
31else
32WINPREFIX  := $(shell ./find-mingw32.sh gcc)
33endif
34WINCFLAGS  := $(GCCWARN) -Wno-sign-compare -Os -fomit-frame-pointer \
35              -D_FILE_OFFSET_BITS=64
36WINLDFLAGS := -Os -s
37endif
38WINCFLAGS += -I. -I../win -I.. -I../libfat -I../libinstaller \
39             -I../libinstaller/getopt
40
41WINCC      := $(WINPREFIX)gcc
42WINAR      := $(WINPREFIX)ar
43WINRANLIB  := $(WINPREFIX)ranlib
44
45WINCC_IS_GOOD := $(shell $(WINCC) $(WINCFLAGS) $(WINLDFLAGS) \
46        -o hello.exe ../win/hello.c >/dev/null 2>&1 ; echo $$?)
47
48.SUFFIXES: .c .obj .lib .exe .i .s .S
49
50SRCS     = ../win/syslinux.c ../win/ntfssect.c
51OBJS     = $(patsubst %.c,%.obj,$(notdir $(SRCS)))
52LIBSRC   = ../libinstaller/fs.c \
53           ../libinstaller/syslxmod.c \
54           ../libinstaller/syslxopt.c \
55           ../libinstaller/setadv.c \
56           ../libinstaller/getopt/getopt_long.c \
57           ../libinstaller/bootsect_bin.c \
58           ../libinstaller/ldlinux_bin.c \
59           ../libinstaller/mbr_bin.c \
60           $(wildcard ../libfat/*.c)
61LIBOBJS  = $(patsubst %.c,%.obj,$(notdir $(LIBSRC)))
62
63LIB      = syslinux.lib
64
65VPATH = .:../win:../libfat:../libinstaller:../libinstaller/getopt
66
67TARGETS = syslinux.exe
68
69ifeq ($(WINCC_IS_GOOD),0)
70all: $(TARGETS)
71else
72all:
73        rm -f $(TARGETS)
74endif
75
76tidy dist:
77        -rm -f *.o *.obj *.lib *.i *.s *.a .*.d *.tmp *_bin.c hello.exe
78
79clean: tidy
80
81spotless: clean
82        -rm -f *~ $(TARGETS)
83
84installer:
85
86$(LIB): $(LIBOBJS)
87        rm -f $@
88        $(WINAR) cq $@ $^
89        $(WINRANLIB) $@
90
91syslinux.exe: $(OBJS) $(LIB)
92        $(WINCC) $(WINLDFLAGS) -o $@ $^
93
94
95%.obj: %.c
96        $(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -c -o $@ $<
97%.i: %.c
98        $(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -E -o $@ $<
99%.s: %.c
100        $(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -S -o $@ $<
101
102-include .*.d *.tmp
Note: See TracBrowser for help on using the browser.