summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-07-06 11:09:46 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-07-06 11:09:46 (EDT)
commit4cea4ecbfd27152cd3b6e6dfc3ca1ca0cf03c7fc (patch)
treeb8bd16914cfe09649aa552c1b9a38f070656efb9
parent9f27a737e7f4b720168de81c86714230e3971e49 (diff)
build: Generate executables in subdirectories
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am24
-rw-r--r--helpers/.gitignore1
-rw-r--r--helpers/local.mk2
-rw-r--r--src/.gitignore1
-rw-r--r--src/local.mk2
-rw-r--r--src/opk/local.mk2
7 files changed, 17 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index 034506a..1eaf30a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,7 +28,6 @@ Makefile
.dirstamp
*.o
/version.c
-/opkg-opk
/opkg-opk-*.tar*
/opkg-opk-*/
/test-suite.log
diff --git a/Makefile.am b/Makefile.am
index 687ac8e..af93eb3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,38 +40,38 @@ endif
# * Our release target
PACKAGE_STRING = $(PACKAGE_NAME) $(PACKAGE_VERSION)$(PACKAGE_VERSION_GIT)
-bin_PROGRAMS = opkg-opk
+bin_PROGRAMS = src/opkg-opk
if WITH_HELPERS
-helpers_PROGRAMS = mknod
+helpers_PROGRAMS = helpers/mknod
endif
-opkg_opk_SOURCES =
-opkg_opk_CFLAGS = \
+src_opkg_opk_SOURCES =
+src_opkg_opk_CFLAGS = \
$(WARN_CFLAGS) \
$(ASAN_CFLAGS)
-opkg_opk_CPPFLAGS = \
+src_opkg_opk_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
$(ZLIB_CFLAGS)
-opkg_opk_LDADD = \
+src_opkg_opk_LDADD = \
$(ASAN_CFLAGS) \
$(ZLIB_LIBS)
-opkg_opk_LINK = $(LINK) version.c
-EXTRA_opkg_opk_DEPENDENCIES = version.c
+src_opkg_opk_LINK = $(LINK) version.c
+EXTRA_src_opkg_opk_DEPENDENCIES = version.c
-mknod_CFLAGS = \
+helpers_mknod_CFLAGS = \
$(WARN_CFLAGS) \
$(ASAN_CFLAGS)
-mknod_CPPFLAGS = \
+helpers_mknod_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\"
-mknod_LDADD = \
+helpers_mknod_LDADD = \
$(ASAN_CFLAGS)
CLEANFILES = version.c
CONFIG_CLEAN_FILES =
EXTRA_DIST = build-aux/config.rpath autogen.sh
-version.c: $(opkg_opk_OBJECTS) $(opkg_opk_DEPENDENCIES)
+version.c: $(src_opkg_opk_OBJECTS) $(src_opkg_opk_DEPENDENCIES)
$(AM_V_GEN)printf 'const char *PACKAGE_VERSION_GIT = "%s";\n' \
"$(PACKAGE_VERSION_GIT)" >version.c
diff --git a/helpers/.gitignore b/helpers/.gitignore
new file mode 100644
index 0000000..1df275a
--- /dev/null
+++ b/helpers/.gitignore
@@ -0,0 +1 @@
+/mknod
diff --git a/helpers/local.mk b/helpers/local.mk
index c4b248e..479b716 100644
--- a/helpers/local.mk
+++ b/helpers/local.mk
@@ -1,4 +1,4 @@
-mknod_SOURCES = \
+helpers_mknod_SOURCES = \
%reldir%/defs.h \
%reldir%/mknod.c \
%reldir%/mode.c \
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..e0f5f90
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1 @@
+/opkg-opk
diff --git a/src/local.mk b/src/local.mk
index 5e8e4bf..72f6ef4 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -1,4 +1,4 @@
-opkg_opk_SOURCES += \
+src_opkg_opk_SOURCES += \
%reldir%/defs.h \
%reldir%/dirent.c \
%reldir%/dirent.h \
diff --git a/src/opk/local.mk b/src/opk/local.mk
index a4722ba..9335153 100644
--- a/src/opk/local.mk
+++ b/src/opk/local.mk
@@ -1,4 +1,4 @@
-opkg_opk_SOURCES += \
+src_opkg_opk_SOURCES += \
%reldir%/opk.h \
%reldir%/read.c \
%reldir%/write.c