nss-packages-LiBwrt/nss-userspace-oss/patches/000-create-makefile.patch
2025-11-04 13:19:44 +08:00

33 lines
617 B
Diff

--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+# Define the build directories based on flags
+DIRS-y :=
+DIRS-$(BUILD_LIBNSS) += lib
+DIRS-$(BUILD_NSSINFO) += nssinfo
+DIRS-$(BUILD_NETFN) += netfn
+DIRS-$(BUILD_LIBPPE) += ppe/ppenl_lib
+DIRS-$(BUILD_PPECFG) += ppe/ppecfg
+
+# Main targets
+all: $(DIRS-y)
+ @echo "Build complete"
+
+# Pattern rule to build each directory
+$(DIRS-y):
+ $(MAKE) -C $@
+
+nssinfo: lib
+
+ppe/ppecfg: ppe/ppenl_lib
+
+clean:
+ @for dir in $(DIRS-y); do \
+ if [ -d $$dir ]; then \
+ $(MAKE) -C $$dir clean; \
+ fi \
+ done
+
+.PHONY: all clean $(DIRS-y)
\ No newline at end of file