Merging upstream version 5.01+dfsg.
[syslinux-debian/hramrach.git] / com32 / cmenu / Makefile
blobd51b2e847c4129bd20c16a5d99f5773240bbe7ba
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 LIBS = libmenu/libmenu.c32 \
21 $(com32)/libutil/libutil.c32 \
22 $(com32)/lib/libcom32.c32
24 topdir = ../..
25 MAKEDIR = $(topdir)/mk
26 include $(MAKEDIR)/elf.mk
28 CFLAGS += -I./libmenu
30 LIBMENU = libmenu/syslnx.o libmenu/com32io.o libmenu/tui.o \
31 libmenu/menu.o libmenu/passwords.o libmenu/des.o libmenu/help.o \
32 $(com32)/libutil/libutil.c32 $(com32)/lib/libcom32.c32
34 CMENUS = $(patsubst %.c,%.c32,$(wildcard *.c))
35 IMENUS = $(patsubst %.menu,%.c32,$(wildcard *.menu))
37 MENUS = $(LIBS) $(CMENUS) $(IMENUS)
39 .SUFFIXES: .S .c .o .elf .c32 .menu
41 .PRECIOUS: %.c
42 %.c: %.menu adv_menu.tpl
43 $(PYTHON) menugen.py --input=$< --output=$@ --template=adv_menu.tpl
45 all: menus
47 libmenu/libmenu.elf: $(LIBMENU)
48 $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) \
49 -o $@ $^
51 tidy dist:
52 rm -f *.o *.lo *.lst *.elf */*.o */*.elf .*.d */.*.d
54 libclean:
55 rm -f libmenu/*.c32
57 clean: tidy menuclean libclean
58 rm -f *.lss *.c32 *.com
60 menuclean:
61 rm -f $(patsubst %.menu,%.c,$(wildcard *.menu))
63 spotless: clean libclean menuclean
64 rm -f *~ \#*
66 menus: $(MENUS)
68 install: # Don't install samples
70 -include .*.d */.*.d