3 include $(TOPDIR
)/rules.mk
6 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)
8 EXTRA_CFLAGS
:= -c
-I.
-I..
/include
13 $(PKG_BUILD_DIR
)/$(1): $(PKG_BUILD_DIR
)
14 $(TARGET_CC
) $(TARGET_CFLAGS
) $(EXTRA_CFLAGS
) -o
$$@
$$(patsubst %.o
,%.c
,$(1))
17 OBJS
:= nvram_linux.o nvram_convert.o main.o
18 LIBNVRAM_OBJS
:= $(PKG_BUILD_DIR
)/nvram_linux.o
$(PKG_BUILD_DIR
)/nvram_convert.o
19 $(foreach obj
,$(OBJS
),$(eval
$(call OBJ_template
,$(obj
))))
22 mkdir
-p
$(PKG_BUILD_DIR
)
24 $(PKG_BUILD_DIR
)/nvram
: $(PKG_BUILD_DIR
)/main.o
$(PKG_BUILD_DIR
)/libnvram.so
25 $(TARGET_CC
) $(TARGET_CFLAGS
) -o
$@
$< -L
$(PKG_BUILD_DIR
) -lnvram
27 $(PKG_BUILD_DIR
)/libnvram.so
: $(LIBNVRAM_OBJS
)
28 $(TARGET_CC
) -shared
-o
$@
$^
30 $(STAGING_DIR
)/lib
/libnvram.so
: $(PKG_BUILD_DIR
)/libnvram.so
33 $(TARGET_DIR
)/usr
/lib
/libnvram.so
: $(PKG_BUILD_DIR
)/libnvram.so
37 $(TARGET_DIR
)/usr
/sbin
/nvram
: $(PKG_BUILD_DIR
)/nvram
38 mkdir
-p
$(TARGET_DIR
)/usr
/sbin
42 compile
: $(PKG_BUILD_DIR
)/libnvram.so
$(STAGING_DIR
)/lib
/libnvram.so
$(PKG_BUILD_DIR
)/nvram
43 install: $(TARGET_DIR
)/usr
/lib
/libnvram.so
$(TARGET_DIR
)/usr
/sbin
/nvram
46 rm -rf
$(PKG_BUILD_DIR
)