Adding upstream version 4.00~pre61+dfsg.
[syslinux-debian/hramrach.git] / com32 / cmenu / Makefile
blob794af74193a71b38dff4be020398e5bdb3054753
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 2001-2009 H. Peter Anvin - All Rights Reserved
4 ## Copyright 2009 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.
12 ## -----------------------------------------------------------------------
15 ## Makefile for the complex menu system
18 NOGPL := 1
20 # This must be defined before MCONFIG is included
21 LIBS = libmenu/libmenu.a
23 topdir = ../..
24 include ../MCONFIG
26 CFLAGS += -I./libmenu
28 LIBMENU = libmenu/syslnx.o libmenu/com32io.o libmenu/tui.o \
29 libmenu/menu.o libmenu/passwords.o libmenu/des.o libmenu/help.o
31 CMENUS = $(patsubst %.c,%.c32,$(wildcard *.c))
32 IMENUS = $(patsubst %.menu,%.c32,$(wildcard *.menu))
34 MENUS = $(CMENUS) $(IMENUS)
36 .SUFFIXES: .S .c .o .elf .c32 .menu
38 .PRECIOUS: %.c
39 %.c: %.menu adv_menu.tpl
40 python menugen.py --input=$< --output=$@ --template=adv_menu.tpl
42 all: menus
44 libmenu/libmenu.a: $(LIBMENU)
45 -rm -f $@
46 $(AR) cq $@ $^
47 $(RANLIB) $@
49 tidy dist:
50 rm -f *.o *.lo *.a *.lst *.elf .*.d */.*.d
52 libclean:
53 rm -f libmenu/*.o libmenu/*.a
55 clean: tidy menuclean libclean
56 rm -f *.lss *.c32 *.com
58 menuclean:
59 rm -f $(patsubst %.menu,%.c,$(wildcard *.menu))
61 spotless: clean libclean menuclean
62 rm -f *~ \#*
64 menus: $(MENUS)
66 install: # Don't install samples
68 -include .*.d */.*.d