xf.li | aa4d92f | 2023-09-13 00:18:58 -0700 | [diff] [blame] | 1 | #******************************************************************************* |
| 2 | # include build/common makefile |
| 3 | #******************************************************************************* |
| 4 | include $(COMMON_MK) |
| 5 | |
| 6 | ##############USER COMIZE BEGIN################ |
| 7 | EXEC = nvro_tool |
| 8 | OBJS = main.o |
| 9 | |
| 10 | CFLAGS += -I$(APP_DIR)/include |
| 11 | CFLAGS += -I$(LIB_DIR)/libcpnv |
| 12 | CFLAGS += -g -Werror=implicit-function-declaration |
| 13 | |
| 14 | LDLIBS = -lcpnv -L$(LIB_DIR)/libcpnv |
| 15 | LDLIBS += -lnvram_sc -L$(LIB_DIR)/libnvram |
| 16 | LDLIBS += -lflags -L$(LIB_DIR)/libflags |
| 17 | LDLIBS += -lcrypto -L$(LIB_DIR)/libssl/install/lib |
| 18 | |
| 19 | ##############USER COMIZE END################## |
| 20 | |
| 21 | #******************************************************************************* |
| 22 | # targets |
| 23 | #******************************************************************************* |
| 24 | EXECS = $(EXEC) |
| 25 | all: $(EXECS) |
| 26 | |
| 27 | $(EXEC): $(OBJS) |
| 28 | $(CC) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group |
| 29 | @cp $@ $@.elf |
| 30 | |
| 31 | romfs: |
| 32 | $(ROMFSINST) $(EXEC) /bin/$(EXEC) |
| 33 | |
| 34 | clean: |
| 35 | -rm -f $(EXEC) *.elf *.gdb *.o |
| 36 | |