aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'com32/elflink/ldlinux/Makefile')
-rw-r--r--com32/elflink/ldlinux/Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/com32/elflink/ldlinux/Makefile b/com32/elflink/ldlinux/Makefile
index 556f93a5..bfec4503 100644
--- a/com32/elflink/ldlinux/Makefile
+++ b/com32/elflink/ldlinux/Makefile
@@ -10,20 +10,21 @@
##
## -----------------------------------------------------------------------
-topdir = ../../..
-MAKEDIR = $(topdir)/mk
+VPATH = $(SRC)
include $(MAKEDIR)/elf.mk
CFLAGS += -I$(topdir)/core/elflink -I$(topdir)/core/include -I$(topdir)/com32/lib -fvisibility=hidden
-LIBS = --whole-archive $(com32)/lib/libcom32min.a
+LIBS = --whole-archive $(objdir)/com32/lib/libcom32min.a
+
+OBJS = ldlinux.o cli.o readconfig.o refstr.o colors.o getadv.o adv.o \
+ execute.o chainboot.o kernel.o get_key.o advwrite.o setadv.o \
+ loadhigh.o msg.o
BTARGET = ldlinux.c32
all: $(BTARGET) ldlinux_lnx.a
-ldlinux.elf : ldlinux.o cli.o readconfig.o refstr.o colors.o getadv.o \
- adv.o execute.o chainboot.o kernel.o get_key.o \
- advwrite.o setadv.o loadhigh.o msg.o
+ldlinux.elf : $(OBJS)
$(LD) $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^ $(LIBS)
LNXCFLAGS += -D__export='__attribute__((visibility("default")))'