Merging upstream version 5.01+dfsg.
[syslinux-debian/hramrach.git] / com32 / gpllib / Makefile
blob3ccc0dc69e8a8cd3920cea35da331b645931145a
2 # LGPL/GPL code library
5 # Include configuration rules
6 topdir = ../..
7 MAKEDIR = $(topdir)/mk
8 include $(MAKEDIR)/lib.mk
10 REQFLAGS += -I../gplinclude -I../gplinclude/zzjson
12 GPLDIRS := . disk dmi vpd acpi zzjson
13 LIBOBJS := $(foreach dir,$(GPLDIRS),$(patsubst %.c,%.o,$(wildcard $(dir)/*.c)))
15 BINDIR = /usr/bin
16 LIBDIR = /usr/lib
17 DATADIR = /usr/share
18 AUXDIR = $(DATADIR)/syslinux
19 INCDIR = /usr/include
20 COM32DIR = $(AUXDIR)/com32
22 all: libgpl.c32
24 libgpl.elf : $(LIBOBJS)
25 $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^
27 tidy dist clean:
28 find . \( -name \*.o -o -name .\*.d -o -name \*.tmp \) -print0 | \
29 xargs -0r rm -f
31 spotless: clean
32 rm -f *.c32
33 rm -f *~ \#* */*~ */\#*
35 # Mixing in the GPL include files is suboptimal, but I'm not sure
36 # there is a better way to do it.
37 install: all
38 mkdir -m 755 -p $(INSTALLROOT)$(COM32DIR)
39 install -m 644 libgpl.c32 $(INSTALLROOT)$(COM32DIR)
40 mkdir -p $(INSTALLROOT)$(COM32DIR)/include/
41 cp -r ../gplinclude $(INSTALLROOT)$(COM32DIR)/include/
43 -include .*.d */.*.d */*/.*.d