2 # LGPL/GPL code library
5 # Include configuration rules
6 include $(MAKEDIR
)/lib.mk
8 REQFLAGS
+= -I
$(SRC
)/..
/gplinclude
-I
$(SRC
)/..
/gplinclude
/zzjson
10 GPLDIRS
:= $(SRC
) $(addprefix $(SRC
)/,disk dmi vpd acpi zzjson
)
11 LIBOBJS
:= $(subst $(SRC
)/,,$(foreach dir,$(GPLDIRS
),$(patsubst %.c
,%.o
,$(wildcard $(dir)/*.c
))))
16 AUXDIR
= $(DATADIR
)/syslinux
18 COM32DIR
= $(AUXDIR
)/com32
20 all: makeoutputdirs libgpl.c32
23 @mkdir
-p
$(foreach b
, \
24 $(addprefix $(OBJ
),$(sort $(dir $(LIBOBJS
)))),$(b
))
26 libgpl.elf
: $(LIBOBJS
)
27 $(LD
) -shared
$(LDFLAGS
) -soname
$(patsubst %.elf
,%.c32
,$(@F
)) -o
$@
$^
30 find . \
( -name \
*.o
-o
-name .\
*.d
-o
-name \
*.tmp \
) -print0 | \
35 rm -f
*~ \
#* */*~ */\#*
37 # Mixing in the GPL include files is suboptimal, but I'm not sure
38 # there is a better way to do it.
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/
45 -include .
*.d
*/.
*.d
*/*/.
*.d