mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Work around what looks like a bad make(1) bug. For some reason,
make(1) wants to build loader.sym *before* the .o files. Eliminating
one seeminly intermediate step avoids the problem. Somehow, it seems
that variables are not getting expanded at the right time.
Any explanations would be appreciated...
Changing:
${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
${LD} ...
To:
BASEOBJS= ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
${BASE}.sym: ${BASEOBJS}
echo ${BASEOBJS}
${LD} ...
.. the echo only shows LIBFICL, CRT and vers.o. ${OBJS} is not included.
This commit is contained in:
parent
84982751aa
commit
b62ddc1363
1 changed files with 3 additions and 5 deletions
|
|
@ -40,20 +40,18 @@ CRT= start.o
|
|||
STRIP=
|
||||
BINDIR?= /boot
|
||||
|
||||
all: ${BASE}
|
||||
all: ${BASE} ${BASE}.help
|
||||
|
||||
vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
|
||||
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
|
||||
${CC} -c vers.c
|
||||
|
||||
${BASE}: ${BASE}.sym ${BASE}.help
|
||||
objcopy -O binary ${BASE}.sym ${BASE}
|
||||
|
||||
${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
|
||||
${BASE}: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
|
||||
${LD} -o ${BASE}.sym -M -e start -N -Ttext ${LOAD_ADDRESS} \
|
||||
${CRT} ${OBJS} vers.o \
|
||||
-L${DESTDIR}${LIBDIR} ${LIBSTAND} ${LIBALPHA} ${LIBFICL} ${LIBSTAND} \
|
||||
>${.OBJDIR}/${BASE}.list
|
||||
objcopy -O binary ${BASE}.sym ${BASE}
|
||||
|
||||
CLEANFILES+= ${BASE}.help
|
||||
${BASE}.help: help.common help.alpha
|
||||
|
|
|
|||
Loading…
Reference in a new issue