aboutsummaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/elf.mk10
-rw-r--r--mk/lib.mk5
2 files changed, 11 insertions, 4 deletions
diff --git a/mk/elf.mk b/mk/elf.mk
index 76b5487e..bd8775cf 100644
--- a/mk/elf.mk
+++ b/mk/elf.mk
@@ -47,7 +47,7 @@ com32 = $(topdir)/com32
core = $(topdir)/core
ifneq ($(NOGPL),1)
-GPLLIB = $(objdir)/com32/gpllib/libcom32gpl.c32
+GPLLIB = $(objdir)/com32/gpllib/libgpl.c32
GPLINCLUDE = -I$(com32)/gplinclude
else
GPLLIB =
@@ -68,7 +68,7 @@ LNXCFLAGS = -I$(com32)/libutil/include -W -Wall -O -g -D_GNU_SOURCE
LNXSFLAGS = -g
LNXLDFLAGS = -g
-C_LIBS = $(objdir)/com32/libutil/libutil_com.c32 $(GPLLIB) \
+C_LIBS = $(objdir)/com32/libutil/libutil.c32 $(GPLLIB) \
$(objdir)/com32/lib/libcom32.c32
C_LNXLIBS = $(objdir)/com32/libutil/libutil_lnx.a \
$(objdir)/com32/elflink/ldlinux/ldlinux_lnx.a
@@ -95,5 +95,9 @@ C_LNXLIBS = $(objdir)/com32/libutil/libutil_lnx.a \
%.lnx: %.lo $(LNXLIBS) $(C_LNXLIBS)
$(CC) $(LNXCFLAGS) -o $@ $^
-%.c32: %.o $(C_LIBS)
+.PRECIOUS: %.elf
+%.elf: %.o $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
+
+%.c32: %.elf
+ $(OBJCOPY) --strip-debug --strip-unneeded $< $@
diff --git a/mk/lib.mk b/mk/lib.mk
index 499a13b6..94502777 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -161,7 +161,7 @@ LIBLOAD_OBJS = \
LIBMODULE_OBJS = \
sys/module/common.o sys/module/$(ARCH)/elf_module.o \
- sys/module/$(ARCH)/shallow_module.o sys/module/elfutils.o \
+ sys/module/elfutils.o \
sys/module/exec.o sys/module/elf_module.o
# ZIP library object files
@@ -237,3 +237,6 @@ LDFLAGS = -m elf_$(ARCH) --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld
.c.ls:
$(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -S -o $@ $<
+
+%.c32: %.elf
+ $(OBJCOPY) --strip-debug --strip-unneeded $< $@