[Feature][ZXW-88]merge P50 version
Only Configure: No
Affected branch: master
Affected module: unknown
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I34667719d9e0e7e29e8e4368848601cde0a48408
diff --git a/ap/app/flags_tool/Makefile b/ap/app/flags_tool/Makefile
new file mode 100755
index 0000000..dffd1dd
--- /dev/null
+++ b/ap/app/flags_tool/Makefile
@@ -0,0 +1,45 @@
+.EXPORT_ALL_VARIABLES:
+include $(COMMON_MK)
+
+
+EXEC = flags_tool
+
+SRCS=$(wildcard ./src/*.c)
+OBJS = $(patsubst %.c,%.o,$(SRCS))
+
+CFLAGS += -Wall -g
+
+CFLAGS += -Werror=implicit-int \
+ -Werror=implicit-function-declaration \
+ -Werror=float-equal \
+ -Werror=return-type \
+ -Werror=enum-compare \
+ -Werror=init-self
+
+CFLAGS += -O2
+
+CFLAGS += -I./inc \
+
+CFLAGS += -I../include
+
+LDLIBS += -lpthread
+
+LDLIBS += -lflags -L$(zte_lib_path)/libflags
+
+
+#*******************************************************************************
+# targets
+#*******************************************************************************
+all: $(EXEC)
+
+$(EXEC): $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group
+ $(CC) $(LD_BEGIN) -static $(LDFLAGS) -o $@_static $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group $(LD_END)
+ cp $(EXEC) $(EXEC).elf
+ cp $(EXEC)_static $(EXEC)_static.elf
+
+romfs root_fs:
+ $(ROMFSINST) /bin/$(EXEC)_static
+
+clean:
+ -rm -f $(EXEC) $(EXEC)_static *.elf *.gdb *.o ./src/*.o