diff options
author | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-06-21 16:54:37 +0000 |
---|---|---|
committer | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-06-21 16:54:37 +0000 |
commit | 4d953d3a481dd847524eae78c7aae00153bc7efd (patch) | |
tree | 37c9cbe251e4fb790aaa72e862c35822be30b491 /package/utils/nvram/src/Makefile | |
parent | 801985e5286881dd578a19280b2a6c8e212a530d (diff) |
packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37007 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/utils/nvram/src/Makefile')
-rw-r--r-- | package/utils/nvram/src/Makefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/package/utils/nvram/src/Makefile b/package/utils/nvram/src/Makefile new file mode 100644 index 0000000000..4872728baf --- /dev/null +++ b/package/utils/nvram/src/Makefile @@ -0,0 +1,33 @@ +CLI_FILENAME = nvram + +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 $(CLI_FILENAME) $(LIB_FILENAME)* *.o |