summaryrefslogtreecommitdiff
path: root/ldso/util/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-04-23 17:43:54 +0000
committerEric Andersen <andersen@codepoet.org>2001-04-23 17:43:54 +0000
commit66f269d2a51dae6a2cb10f1a9ae4aaeba815219b (patch)
treee2094832990caf6d849ba90e4b1a82a6264f86b3 /ldso/util/Makefile
parentc4a3f3f81ea90e3df93c352ac0e2161a4bfd3327 (diff)
Initial checkin for ld.so. This is a combination of effort from Manuel Novoa
III and me. I've been working on stripping out arch dependant stuff and replacing it with generic stuff whenever possible. -Erik
Diffstat (limited to 'ldso/util/Makefile')
-rw-r--r--ldso/util/Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/ldso/util/Makefile b/ldso/util/Makefile
new file mode 100644
index 000000000..18e8794ba
--- /dev/null
+++ b/ldso/util/Makefile
@@ -0,0 +1,38 @@
+TOPDIR=../../
+include $(TOPDIR)Rules.mak
+include ../Config.mk
+
+CFLAGS += -DLDSO_ADDR="0x62f00020" # needed by ldd.o
+CFLAGS += -I./ -I../../include/
+LDFLAGS += -nostdlib ../../libc.a ../../crt0.o $(GCCINCDIR)/../libgcc.a
+
+ALL = ldconfig ldd # lddstub
+
+all: $(ALL)
+
+CSRC= readelf.c ldconfig.c ldd.c
+COBJS=$(patsubst %.c,%.o, $(CSRC))
+OBJS=$(COBJS)
+
+$(COBJS): %.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $*.o
+
+readelf.o: readelf.c readelf2.c
+
+ldconfig: ldconfig.o readelf.o
+ $(CC) -static $(CFLAGS) $^ $(LDFLAGS) -o $@
+
+ldd: ldd.o readelf.o
+ $(CC) -static $(CFLAGS) $^ $(LDFLAGS) -o $@
+
+#ifeq ($(DEBUG),true)
+#STUBFLAGS = -Wl,-dynamic-linker,../d-link/ld-linux.so
+#endif
+
+#lddstub: lddstub.o
+# $(CC) $(CFLAGS) $(LDFLAGS) $(STUBFLAGS) $^ -o $@
+
+clean:
+ rm -f $(ALL) *.o *~ core
+