aboutsummaryrefslogtreecommitdiffstats
path: root/com32/cmenu/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2009-03-02 10:51:25 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2009-03-02 10:51:25 -0800
commit37bfb1cb8b4c1d670e0d407b83c5270f7c457389 (patch)
tree81096599d4315dc2debb8c3faa189371d1d15566 /com32/cmenu/Makefile
parent2b570465a0df2070aca723559a9f309d92530e6a (diff)
downloadsyslinux-37bfb1cb8b4c1d670e0d407b83c5270f7c457389.tar.gz
syslinux-37bfb1cb8b4c1d670e0d407b83c5270f7c457389.tar.xz
syslinux-37bfb1cb8b4c1d670e0d407b83c5270f7c457389.zip
Move complex menu to com32/cmenu; clean up the Makefiles
Move the complex menu system into the com32 directory so it can be sequenced properly with respect to hdt (it needs to be built after com32/lib but before com32/hdt). While we're at it, clean up the Makefiles somewhat.
Diffstat (limited to 'com32/cmenu/Makefile')
-rw-r--r--com32/cmenu/Makefile78
1 files changed, 78 insertions, 0 deletions
diff --git a/com32/cmenu/Makefile b/com32/cmenu/Makefile
new file mode 100644
index 00000000..e8627a9f
--- /dev/null
+++ b/com32/cmenu/Makefile
@@ -0,0 +1,78 @@
+## -----------------------------------------------------------------------
+##
+## Copyright 2001-2009 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.
+##
+## -----------------------------------------------------------------------
+
+##
+## Makefile for the complex menu system
+##
+
+# This must be defined before MCONFIG is included
+LIBS = libmenu/libmenu.a
+
+topdir = ../..
+include ../MCONFIG
+
+CFLAGS += -I./libmenu
+
+LIBMENU = libmenu/syslnx.o libmenu/com32io.o libmenu/tui.o \
+ libmenu/menu.o libmenu/passwords.o libmenu/des.o libmenu/help.o
+
+CMENUS = $(patsubst %.c,%.c32,$(wildcard *.c))
+IMENUS = $(patsubst %.menu,%.c32,$(wildcard *.menu))
+
+MENUS = $(CMENUS) $(IMENUS)
+
+.SUFFIXES: .S .c .o .elf .c32 .menu
+
+.PRECIOUS: %.c
+%.c: %.menu adv_menu.tpl
+ python menugen.py --input=$< --output=$@ --template=adv_menu.tpl
+
+.PRECIOUS: %.o
+%.o: %.S
+ $(CC) $(SFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.o
+%.o: %.c %.h
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+.PRECIOUS: %.elf
+%.elf: %.o libmenu/libmenu.a $(LIBS)
+ $(LD) $(LDFLAGS) -o $@ $^
+
+%.c32: %.elf
+ $(OBJCOPY) -O binary $< $@
+
+all: menus
+
+libmenu/libmenu.a: $(LIBMENU)
+ -rm -f $@
+ $(AR) cq $@ $^
+ $(RANLIB) $@
+
+tidy dist:
+ rm -f *.o *.lo *.a *.lst *.elf
+
+libclean:
+ rm -f libmenu/*.o libmenu/*.a
+
+clean: tidy menuclean libclean
+ rm -f *.lss *.c32 *.com
+
+menuclean:
+ rm -f $(patsubst %.menu,%.c,$(wildcard *.menu))
+
+spotless: clean libclean menuclean
+ rm -f *~ \#*
+
+menus: $(MENUS)
+
+install: # Don't install samples