a1740610aca92fca71a5fc7e3e096d9474de6259
[external/syslinux.git] / com32 / gpllib / Makefile
1 #
2 # LGPL/GPL code library
3 #
4
5 # Include configuration rules
6 topdir = ../..
7 include ../lib/MCONFIG
8
9 REQFLAGS += -I../gplinclude
10
11 GPLDIRS := . disk dmi vpd acpi
12 LIBOBJS := $(foreach dir,$(GPLDIRS),$(patsubst %.c,%.o,$(wildcard $(dir)/*.c)))
13
14 BINDIR   = /usr/bin
15 LIBDIR   = /usr/lib
16 DATADIR  = /usr/share
17 AUXDIR   = $(DATADIR)/syslinux
18 INCDIR   = /usr/include
19 COM32DIR = $(AUXDIR)/com32
20
21 all: libcom32gpl.a
22
23 libcom32gpl.a : $(LIBOBJS)
24         rm -f $@
25         $(AR) cq $@ $^
26         $(RANLIB) $@
27
28 tidy dist clean:
29         find . \( -name \*.o -o -name \*.a -o -name .\*.d -o -name \*.tmp \) -print0 | \
30                 xargs -0r rm -f
31
32 spotless: clean
33         rm -f *.a
34         rm -f *~ \#* */*~ */\#*
35
36 # Mixing in the GPL include files is suboptimal, but I'm not sure
37 # there is a better way to do it.
38 install: all
39         mkdir -m 755 -p $(INSTALLROOT)$(COM32DIR)
40         install -m 644 libcom32gpl.a $(INSTALLROOT)$(COM32DIR)
41         mkdir -p $(INSTALLROOT)$(COM32DIR)/include/
42         cp -r ../gplinclude $(INSTALLROOT)$(COM32DIR)/include/
43
44 -include .*.d */.*.d */*/.*.d