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