summaryrefslogtreecommitdiffstats
path: root/win32
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-15 10:28:29 +0000
committerhpa <hpa>2004-12-15 10:28:29 +0000
commit907b549d585c74537b300c188b00d3a56d36cc7f (patch)
tree580048f48a4b78553b0772ff9fecc07b04706cb5 /win32
parentab17ed85f788d28130dc074281df7a08a25eb205 (diff)
downloadsyslinux-907b549d585c74537b300c188b00d3a56d36cc7f.tar.gz
syslinux-907b549d585c74537b300c188b00d3a56d36cc7f.tar.xz
syslinux-907b549d585c74537b300c188b00d3a56d36cc7f.zip
Change the win32 build procedure to match the new world; installer
not yet ported
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile56
-rw-r--r--win32/syslinux.c (renamed from win32/syslinux-mingw.c)0
2 files changed, 24 insertions, 32 deletions
diff --git a/win32/Makefile b/win32/Makefile
index bd957fa4..f01369ab 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -36,54 +36,46 @@ CC = mingw-gcc
AR = mingw-ar
RANLIB = mingw-ranlib
endif
-CC_IS_GOOD := $(shell $(CC) $(CFLAGS) $(LDFLAGS) -o hello.exe hello.c >/dev/null 2>&1 ; echo $$?)
CFLAGS = -W -Wall -O2 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
PIC =
LDFLAGS = -O2 -s
endif
-INCLUDE += -I..
+CFLAGS += -I. -I.. -I../libfat
-PERL = perl
+CC_IS_GOOD := $(shell $(CC) $(CFLAGS) $(LDFLAGS) -o hello.exe hello.c >/dev/null 2>&1 ; echo $$?)
-VERSION = $(shell cat ../version)
+.SUFFIXES: .c .o .i .s .S
-.c.o:
- $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $<
+SRCS = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c $(wildcard ../libfat/*.c)
+OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
-.c.i:
- $(CC) $(INCLUDE) $(CFLAGS) -E -o $@ $<
+VPATH = .:..:../libfat
-ifeq ($(CC_IS_GOOD),0)
-all: ../syslinux.exe
-else
-all: # We don't have a working win32 compiler
- rm -f ../syslinux.exe
-endif
+all: installer
-libsyslinux.a: bootsect_bin.o ldlinux_bin.o syslxmod.o
- rm -f $@
- $(AR) cq $@ $^
- $(RANLIB) $@
+tidy:
+ -rm -f *.o *.i *.s *.a .*.d
-../syslinux.exe: syslinux-mingw.o libsyslinux.a
- $(CC) $(LDFLAGS) -o $@ $^
+clean: tidy
+ -rm -f syslinux.exe
-syslxmod.o: ../syslxmod.c ../patch.offset
- $(CC) $(INCLUDE) $(CFLAGS) $(PIC) -DPATCH_OFFSET=`cat ../patch.offset` \
- -c -o $@ $<
+spotless: clean
+ -rm -f *~
-bootsect_bin.o: ../bootsect_bin.c
- $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $<
+installer: syslinux.exe
-ldlinux_bin.o: ../ldlinux_bin.c
- $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $<
+syslinux.exe: $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $^
-tidy:
- rm -f *.o *.a hello.exe
+%.o: %.c
+ $(CC) -Wp,-MT,$@,-MMD,.$@.d $(CFLAGS) -c -o $@ $<
+%.i: %.c
+ $(CC) $(CFLAGS) -E -o $@ $<
+%.s: %.c
+ $(CC) $(CFLAGS) -S -o $@ $<
+
+-include .*.d
-clean: tidy
-spotless: clean
- rm -f ../syslinux.exe *~
diff --git a/win32/syslinux-mingw.c b/win32/syslinux.c
index 0b6b1926..0b6b1926 100644
--- a/win32/syslinux-mingw.c
+++ b/win32/syslinux.c