[kernel] 2.6.31: refresh generic patches
[openwrt.git] / package / nvram / src / Makefile
1 CLI_FILENAME = nvram
2
3 LIB_VERMAJOR = 0
4 LIB_VERMINOR = 1
5 LIB_FILENAME = libnvram.so
6
7 LIB_CFLAGS = $(CFLAGS) -shared -fPIC
8 LIB_LDFLAGS = $(LDFLAGS) -Wl,-soname,$(LIB_FILENAME).$(LIB_VERMAJOR).$(LIB_VERMINOR)
9
10 CLI_CFLAGS = $(CFLAGS)
11 CLI_LDFLAGS = $(LDFLAGS)
12
13 CLI_OBJ = cli.o
14 LIB_OBJ = crc.o nvram.o
15
16 all: cli libnvram
17
18 cli: libnvram
19 $(CC) $(CLI_CFLAGS) -c -o cli.o cli.c
20 $(CC) -o $(CLI_FILENAME) $(CLI_LDFLAGS) $(CLI_OBJ) \
21 $(LIB_FILENAME).$(LIB_VERMAJOR).$(LIB_VERMINOR)
22
23 cli.o: cli.c
24 $(CC) $(CLI_CFLAGS) -c -o $@ $<
25
26 libnvram:
27 $(CC) $(LIB_CFLAGS) -c -o crc.o crc.c
28 $(CC) $(LIB_CFLAGS) -c -o nvram.o nvram.c
29 $(CC) $(LIB_CFLAGS) $(LIB_LDFLAGS) \
30 -o $(LIB_FILENAME).$(LIB_VERMAJOR).$(LIB_VERMINOR) $(LIB_OBJ)
31
32 clean:
33 rm -f $(CLI_FILENAME) $(LIB_FILENAME)* *.o
This page took 0.043064 seconds and 5 git commands to generate.