Last change
on this file since dd1be7c was
e16e8f2,
checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago
|
bootstuff
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[e16e8f2] | 1 | # |
---|
| 2 | # LGPL/GPL code library |
---|
| 3 | # |
---|
| 4 | |
---|
| 5 | # Include configuration rules |
---|
| 6 | include $(MAKEDIR)/lib.mk |
---|
| 7 | |
---|
| 8 | REQFLAGS += -I$(SRC)/../gplinclude -I$(SRC)/../gplinclude/zzjson |
---|
| 9 | |
---|
| 10 | GPLDIRS := $(SRC) $(addprefix $(SRC)/,disk dmi vpd acpi zzjson) |
---|
| 11 | LIBOBJS := $(subst $(SRC)/,,$(foreach dir,$(GPLDIRS),$(patsubst %.c,%.o,$(wildcard $(dir)/*.c)))) |
---|
| 12 | |
---|
| 13 | BINDIR = /usr/bin |
---|
| 14 | LIBDIR = /usr/lib |
---|
| 15 | DATADIR = /usr/share |
---|
| 16 | AUXDIR = $(DATADIR)/syslinux |
---|
| 17 | INCDIR = /usr/include |
---|
| 18 | COM32DIR = $(AUXDIR)/com32 |
---|
| 19 | |
---|
| 20 | all: makeoutputdirs libgpl.c32 |
---|
| 21 | |
---|
| 22 | makeoutputdirs: |
---|
| 23 | @mkdir -p $(foreach b, \ |
---|
| 24 | $(addprefix $(OBJ),$(sort $(dir $(LIBOBJS)))),$(b)) |
---|
| 25 | |
---|
| 26 | libgpl.elf : $(LIBOBJS) |
---|
| 27 | $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^ |
---|
| 28 | |
---|
| 29 | tidy dist clean: |
---|
| 30 | find . \( -name \*.o -o -name .\*.d -o -name \*.tmp \) -print0 | \ |
---|
| 31 | xargs -0r rm -f |
---|
| 32 | |
---|
| 33 | spotless: clean |
---|
| 34 | rm -f *.c32 |
---|
| 35 | rm -f *~ \#* */*~ */\#* |
---|
| 36 | |
---|
| 37 | # Mixing in the GPL include files is suboptimal, but I'm not sure |
---|
| 38 | # there is a better way to do it. |
---|
| 39 | install: all |
---|
| 40 | mkdir -m 755 -p $(INSTALLROOT)$(COM32DIR) |
---|
| 41 | install -m 644 libgpl.c32 $(INSTALLROOT)$(COM32DIR) |
---|
| 42 | mkdir -p $(INSTALLROOT)$(COM32DIR)/include/ |
---|
| 43 | cp -r $(SRC)/../gplinclude $(INSTALLROOT)$(COM32DIR)/include/ |
---|
| 44 | |
---|
| 45 | -include .*.d */.*.d */*/.*.d |
---|
Note: See
TracBrowser
for help on using the repository browser.