diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-22 15:59:04 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-22 15:59:04 -0700 |
commit | ad0d53c9ed34da93d7b9ce96ffaf5570c7c2a95b (patch) | |
tree | a074613ab07b2879747344bb0e1193743e8af727 /win32 | |
parent | 68ac3bd7646f38a61acf798ef48b9cc3e0d5c8e8 (diff) | |
download | syslinux-ad0d53c9ed34da93d7b9ce96ffaf5570c7c2a95b.tar.gz |
win32: use .obj not .o, and build an intermediate library
Use .obj as the extension, rather than .o, to match Windows
conventions. Furthermore, build an intermediate library for the stuff
that we pick up from elsewhere; this makes it easier to build
additional Windows binaries with helper functions in libinstaller or
another source library.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/win32/Makefile b/win32/Makefile index af95b2e6..9009ccd0 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1,6 +1,7 @@ ## ----------------------------------------------------------------------- ## ## 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 @@ -44,14 +45,17 @@ WINCC_IS_GOOD := $(shell $(WINCC) $(WINCFLAGS) $(WINLDFLAGS) -o hello.exe hello. .SUFFIXES: .c .o .i .s .S -SRCS = syslinux.c \ - ../libinstaller/fat.c \ +SRCS = syslinux.c +OBJS = $(patsubst %.c,%.obj,$(notdir $(SRCS))) +LIBSRC = ../libinstaller/fat.c \ ../libinstaller/syslxmod.c \ ../libinstaller/bootsect_bin.c \ ../libinstaller/ldlinux_bin.c \ ../libinstaller/mbr_bin.c \ $(wildcard ../libfat/*.c) -OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS))) +LIBOBJS = $(patsubst %.c,%.obj,$(notdir $(LIBSRC))) + +LIB = syslinux.lib VPATH = .:../libfat:../libinstaller @@ -65,7 +69,7 @@ all: endif tidy dist: - -rm -f *.o *.i *.s *.a .*.d *.tmp *_bin.c hello.exe + -rm -f *.o *.obj *.lib *.i *.s *.a .*.d *.tmp *_bin.c hello.exe clean: tidy @@ -74,11 +78,15 @@ spotless: clean installer: -syslinux.exe: $(OBJS) +$(LIB): $(LIBOBJS) + $(WINAR) cq $@ $^ + $(WINRANLIB) $@ + +syslinux.exe: $(OBJS) $(LIB) $(WINCC) $(WINLDFLAGS) -o $@ $^ -%.o: %.c +%.obj: %.c $(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -c -o $@ $< %.i: %.c $(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -E -o $@ $< |