| .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 |