aboutsummaryrefslogtreecommitdiffstats
path: root/utils/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-05-29 15:11:38 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-05-29 15:11:38 -0700
commitb536209dfb7bd50c37061735fe10d2c19a97d26d (patch)
tree9d8ca6882fc5d9721fb0efea1abfd6dc09886814 /utils/Makefile
parent3ec40a0119587f63411475c76c69f9db24c7598e (diff)
downloadsyslinux-b536209dfb7bd50c37061735fe10d2c19a97d26d.tar.gz
syslinux-b536209dfb7bd50c37061735fe10d2c19a97d26d.tar.xz
syslinux-b536209dfb7bd50c37061735fe10d2c19a97d26d.zip
Move files out of root into core, dos, and utils
Move source files out of the root directory; the root is a mess and has become virtually unmaintainable. The Syslinux core now lives in core/; the Linux and generic utilities has moved into utils/, and copybs.com has moved into dos/; it had to go somewhere, and it seemed as good a place as any.
Diffstat (limited to 'utils/Makefile')
-rw-r--r--utils/Makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/utils/Makefile b/utils/Makefile
new file mode 100644
index 00000000..0c5a3636
--- /dev/null
+++ b/utils/Makefile
@@ -0,0 +1,58 @@
+## -----------------------------------------------------------------------
+##
+## Copyright 1998-2008 H. Peter Anvin - All Rights Reserved
+##
+## 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
+## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+## Boston MA 02111-1307, USA; either version 2 of the License, or
+## (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+#
+# SYSLINUX utilities
+#
+# No builtin rules
+MAKEFLAGS += -r
+MAKE += -r
+
+TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
+
+CC = gcc
+
+gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(1) dummy.c -o $$tmpf 2>/dev/null; \
+ then echo '$(1)'; else echo '$(2)'; fi; rm -f $$tmpf)
+
+comma := ,
+LDHASH := $(call gcc_ok,-Wl$(comma)--hash-style=both,)
+
+CFLAGS = -W -Wall -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
+LDFLAGS = -O2 -s $(LDHASH)
+LD = ld
+PERL = perl
+
+TARGETS = mkdiskimage gethostip
+ASIS = keytab-lilo lss16toppm md5pass ppmtolss16 sha1pass syslinux2ansi
+
+all: mkdiskimage gethostip
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+mkdiskimage: mkdiskimage.in ../mbr/mbr.bin bin2hex.pl
+ $(PERL) bin2hex.pl < ../mbr/mbr.bin | cat mkdiskimage.in - > $@
+ chmod a+x $@
+
+gethostip: gethostip.o
+ $(CC) $(LDFLAGS) -o $@ $^
+
+tidy dist:
+ rm -f *.o
+
+clean: tidy
+ rm -f $(TARGETS)
+
+spotless: clean
+
+installer: all