lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #*******************************************************************************
|
| 2 | # include ZTE application makefile
|
| 3 | #*******************************************************************************
|
| 4 | include $(COMMON_MK)
|
| 5 |
|
| 6 | WORKPATH = $(zte_lib_path)
|
| 7 | SOFT_TIMER_PATH = $(zte_lib_path)/libsoft_timer
|
| 8 | #*******************************************************************************
|
| 9 | # execute
|
| 10 | #*******************************************************************************
|
| 11 | EXEC = zte_log_agent
|
| 12 |
|
| 13 | #*******************************************************************************
|
| 14 | # objects
|
| 15 | #*******************************************************************************
|
| 16 | c_sources = $(wildcard *.c)
|
| 17 |
|
| 18 | OBJS=$(c_sources:%c=%o)
|
| 19 |
|
| 20 | #*******************************************************************************
|
| 21 | # include path
|
| 22 | #*******************************************************************************
|
| 23 | CFLAGS += -I./../include \
|
| 24 | -I$(zte_app_path)/include \
|
| 25 | -I$(zte_lib_path)/libnvram
|
| 26 | CFLAGS += -g
|
| 27 |
|
| 28 | #*******************************************************************************
|
| 29 | # library
|
| 30 | #*******************************************************************************
|
| 31 | LDLIBS += -lpthread
|
| 32 | LDLIBS += -lnvram_sc -L$(zte_lib_path)/libnvram
|
| 33 |
|
| 34 |
|
| 35 | #*******************************************************************************
|
| 36 | # library path
|
| 37 | #*******************************************************************************
|
| 38 | LDLIBS += -L$(zte_lib_path)/libnvram
|
| 39 |
|
| 40 | #*******************************************************************************
|
| 41 | # targets
|
| 42 | #*******************************************************************************
|
| 43 | all: $(EXEC)
|
| 44 |
|
| 45 | $(EXEC): $(OBJS)
|
| 46 | $(CC) $(LDFLAGS) -o $@ $(OBJS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
|
| 47 |
|
| 48 | romfs:
|
| 49 | cp $(EXEC) $(EXEC).elf
|
| 50 | $(ROMFSINST) /bin/$(EXEC)
|
| 51 |
|
| 52 | clean:
|
| 53 | -rm -f $(EXEC) *.elf *.gdb *.o
|
| 54 |
|