move source files to src/.
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 18 Jun 2006 18:05:20 +0000 (18:05 +0000)
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 18 Jun 2006 18:05:20 +0000 (18:05 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3993 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/robocfg/Makefile
package/robocfg/src/Makefile [new file with mode: 0644]
package/robocfg/src/etc53xx.h [moved from package/robocfg/etc53xx.h with 100% similarity]
package/robocfg/src/robocfg.c [moved from package/robocfg/robocfg.c with 100% similarity]

index 81cf99ac237c32b49fdca9d51989914d78a58389..49f6005699797d7545fe991158aa301be1b28a29 100644 (file)
@@ -16,15 +16,20 @@ TITLE:=BCM5325E/536x switch configuration utility
 DESCRIPTION:=Broadcom BCM5325E/536x switch configuration utility
 endef
 
+define Build/Prepare
+       mkdir -p $(PKG_BUILD_DIR)
+       $(CP) ./src/* $(PKG_BUILD_DIR)/
+endef
+
 define Build/Compile
-       $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/robocfg robocfg.c
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+               all
 endef
 
 define Package/robocfg/install
        install -d -m0755 $(1)/sbin
        install -m0755 $(PKG_BUILD_DIR)/robocfg $(1)/sbin/
-       $(RSTRIP) $(1)
-       $(IPKG_BUILD) $(1) $(PACKAGE_DIR)
 endef
 
 $(eval $(call BuildPackage,robocfg))
diff --git a/package/robocfg/src/Makefile b/package/robocfg/src/Makefile
new file mode 100644 (file)
index 0000000..fa763ed
--- /dev/null
@@ -0,0 +1,12 @@
+# $Id$
+
+all: robocfg
+
+%.o: %.c
+       $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $^
+
+robocfg: robocfg.o
+       $(CC) -o $@ $^
+
+clean:
+       rm -f *.o robocfg