summaryrefslogtreecommitdiffstats
path: root/package/unvram/src/Makefile
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-04-26 14:54:05 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-04-26 14:54:05 +0000
commit5abab3a9f1bdc487aadbb3dd927ce9ff598f3ff2 (patch)
tree12ea5b99fc26ab1ad455f6206324b4144ced66ea /package/unvram/src/Makefile
parent6bd8b4d36b954a2b086c7330773ab98697cd9f71 (diff)
[package] Add unvram, a nvram manipulation tool suitable for brcm-2.4 and bcm47xx platforms
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15426 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/unvram/src/Makefile')
-rw-r--r--package/unvram/src/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/unvram/src/Makefile b/package/unvram/src/Makefile
new file mode 100644
index 000000000..7f92aa8b8
--- /dev/null
+++ b/package/unvram/src/Makefile
@@ -0,0 +1,33 @@
+CLI_FILENAME = unvram
+
+LIB_VERMAJOR = 0
+LIB_VERMINOR = 1
+LIB_FILENAME = libnvram.so
+
+LIB_CFLAGS = $(CFLAGS) -shared -fPIC
+LIB_LDFLAGS = $(LDFLAGS) -Wl,-soname,$(LIB_FILENAME).$(LIB_VERMAJOR).$(LIB_VERMINOR)
+
+CLI_CFLAGS = $(CFLAGS)
+CLI_LDFLAGS = $(LDFLAGS)
+
+CLI_OBJ = cli.o
+LIB_OBJ = crc.o nvram.o
+
+all: cli libnvram
+
+cli: libnvram
+ $(CC) $(CLI_CFLAGS) -c -o cli.o cli.c
+ $(CC) -o $(CLI_FILENAME) $(CLI_LDFLAGS) $(CLI_OBJ) \
+ $(LIB_FILENAME).$(LIB_VERMAJOR).$(LIB_VERMINOR)
+
+cli.o: cli.c
+ $(CC) $(CLI_CFLAGS) -c -o $@ $<
+
+libnvram:
+ $(CC) $(LIB_CFLAGS) -c -o crc.o crc.c
+ $(CC) $(LIB_CFLAGS) -c -o nvram.o nvram.c
+ $(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) \
+ -o $(LIB_FILENAME).$(LIB_VERMAJOR).$(LIB_VERMINOR) $(LIB_OBJ)
+
+clean:
+ rm -f nvram $(LIB_FILENAME)* *.o