version: Update to 4.08, update year to 2014
[syslinux/sherbszt.git] / com32 / sysdump / Makefile
blob98e7f15ad51e5d8a1c3e155dbd3976fe57026b83
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 2001-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., 51 Franklin St, Fifth Floor,
9 ## Boston MA 02110-1301, USA; either version 2 of the License, or
10 ## (at your option) any later version; incorporated herein by reference.
12 ## -----------------------------------------------------------------------
15 ## Simple menu system
18 topdir = ../..
19 MAKEDIR = $(topdir)/mk
20 include $(MAKEDIR)/com32.mk
21 -include $(topdir)/version.mk
23 LIBS = ../libupload/libcom32upload.a
24 LNXLIBS = ../libutil/libutil_lnx.a
26 CFLAGS += -I$(com32) -I$(topdir)
28 MODULES = sysdump.c32
29 TESTFILES =
31 SRCS = $(wildcard *.c)
32 OBJS = $(patsubst %.c,%.o,$(SRCS))
34 # The DATE is set on the make command line when building binaries for
35 # official release. Otherwise, substitute a hex string that is pretty much
36 # guaranteed to be unique to be unique from build to build.
37 ifndef HEXDATE
38 HEXDATE := $(shell $(PERL) $(topdir)/now.pl $(SRCS) $(wildcard *.h))
39 endif
40 ifndef DATE
41 DATE := $(shell sh $(topdir)/gen-id.sh $(VERSION) $(HEXDATE))
42 endif
44 CFLAGS += -DDATE='"$(DATE)"'
46 all: $(MODULES) $(TESTFILES)
48 sysdump.elf : $(OBJS) $(LIBS) $(C_LIBS)
49 $(LD) $(LDFLAGS) -o $@ $^
51 tidy dist:
52 rm -f *.o *.lo *.a *.lst *.elf .*.d *.tmp
54 clean: tidy
55 rm -f *.lnx
57 spotless: clean
58 rm -f *.lss *.c32 *.com
59 rm -f *~ \#*
61 install:
63 -include .*.d