source: bootcd/isolinux/syslinux-6.03/win64/ntfstest/Makefile

Last change on this file was e16e8f2, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

bootstuff

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[e16e8f2]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 Win64 NTFS file cluster test
16#
17# This is separated out mostly so we can have a different set of Makefile
18# variables.
19#
20
21OSTYPE   = $(shell uname -msr)
22# Don't know how to do a native compile here...
23WINPREFIX  := $(shell ../find-mingw64.sh gcc)
24WINCFLAGS  := $(GCCWARN) -Wno-sign-compare -Os -fomit-frame-pointer \
25              -D_FILE_OFFSET_BITS=64
26WINLDFLAGS := -Os -s
27WINCFLAGS += -I. -I../../win
28
29WINCC      := $(WINPREFIX)gcc
30WINAR      := $(WINPREFIX)ar
31WINRANLIB  := $(WINPREFIX)ranlib
32WINDRES    := $(WINPREFIX)windres
33
34WINCC_IS_GOOD := $(shell $(WINCC) $(WINCFLAGS) $(WINLDFLAGS) \
35        -o hello.exe ../../win/hello.c >/dev/null 2>&1 ; echo $$?)
36
37.SUFFIXES: .c .obj .lib .exe .i .s .S .rc .res
38
39SRCS     = ../../win/ntfstest.c ../../win/ntfssect.c
40RCS      = ../../win/ntfstest.rc
41OBJS     = $(patsubst %.c,%.obj,$(notdir $(SRCS)))
42RESS     = $(patsubst %.rc,%.res,$(notdir $(RCS)))
43
44VPATH = .:../../win
45
46TARGETS = ntfstest64.exe
47
48ifeq ($(WINCC_IS_GOOD),0)
49all: $(TARGETS)
50else
51all:
52        rm -f $(TARGETS)
53endif
54
55tidy dist:
56        -rm -f *.o *.obj *.lib *.i *.s *.a .*.d *.tmp *_bin.c hello.exe
57
58clean: tidy
59
60spotless: clean
61        -rm -f *~ $(TARGETS)
62
63ntfstest64.exe: $(OBJS) $(RESS)
64        $(WINCC) $(WINLDFLAGS) -o $@ $^
65
66
67%.obj: %.c
68        $(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -c -o $@ $<
69%.i: %.c
70        $(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -E -o $@ $<
71%.s: %.c
72        $(WINCC) $(UMAKEDEPS) $(WINCFLAGS) -S -o $@ $<
73%.res: %.rc
74        $(WINDRES) -O COFF $< $@
75
76-include .*.d
Note: See TracBrowser for help on using the repository browser.