summaryrefslogtreecommitdiff
path: root/regress/libexec/ld.so/constructor/prog2
diff options
context:
space:
mode:
Diffstat (limited to 'regress/libexec/ld.so/constructor/prog2')
-rw-r--r--regress/libexec/ld.so/constructor/prog2/Makefile34
-rw-r--r--regress/libexec/ld.so/constructor/prog2/prog2.C16
2 files changed, 50 insertions, 0 deletions
diff --git a/regress/libexec/ld.so/constructor/prog2/Makefile b/regress/libexec/ld.so/constructor/prog2/Makefile
new file mode 100644
index 00000000000..a80ede7dd6d
--- /dev/null
+++ b/regress/libexec/ld.so/constructor/prog2/Makefile
@@ -0,0 +1,34 @@
+# $OpenBSD: Makefile,v 1.1 2003/02/01 19:56:17 drahn Exp $
+
+.include <bsd.obj.mk>
+
+PROG=prog2
+
+SRCS=prog2.C
+
+AA_DIR=${.CURDIR}/../libaa
+AA_OBJDIR!= if [ -d $(AA_DIR)/${__objdir} ]; then \
+ echo "$(AA_DIR)/${__objdir}"; \
+ else \
+ echo "$(AA_DIR)"; \
+ fi
+
+AB_DIR=${.CURDIR}/../libab
+AB_OBJDIR!= if [ -d $(AB_DIR)/${__objdir} ]; then \
+ echo "$(AB_DIR)/${__objdir}"; \
+ else \
+ echo "$(AB_DIR)"; \
+ fi
+
+
+
+CFLAGS=-I${.CURDIR}/../libab
+LDADD=
+LDADD+=-laa
+LDADD+=-lab
+LDFLAGS=-L$(AA_OBJDIR) -L$(AB_OBJDIR)
+LDFLAGS+= -Wl,-rpath,$(AA_OBJDIR) -Wl,-rpath,$(AB_OBJDIR)
+NOMAN=
+CC=c++
+
+.include <bsd.regress.mk>
diff --git a/regress/libexec/ld.so/constructor/prog2/prog2.C b/regress/libexec/ld.so/constructor/prog2/prog2.C
new file mode 100644
index 00000000000..5d96a63d865
--- /dev/null
+++ b/regress/libexec/ld.so/constructor/prog2/prog2.C
@@ -0,0 +1,16 @@
+/*
+ * Public Domain 2003 Dale Rahn
+ *
+ * $OpenBSD: prog2.C,v 1.1 2003/02/01 19:56:17 drahn Exp $
+ */
+#include "iostream.h"
+#include "ab.h"
+BB BBmain("main");
+
+int a;
+int
+main()
+{
+ cout << "main\n";
+ return 0;
+}