xf.li | f1aed28 | 2024-02-06 00:31:51 -0800 | [diff] [blame] | 1 | #*******************************************************************************
|
| 2 | # include ZXIC application makefile
|
| 3 | #*******************************************************************************
|
| 4 | include $(COMMON_MK)
|
| 5 |
|
| 6 | #*******************************************************************************
|
| 7 | # execute
|
| 8 | #*******************************************************************************
|
| 9 | EXEC = clatd
|
| 10 |
|
| 11 | #*******************************************************************************
|
| 12 | # objects
|
| 13 | #*******************************************************************************
|
| 14 | OBJS = clatd.o \
|
| 15 | dump.o \
|
| 16 | checksum.o \
|
| 17 | translate.o \
|
| 18 | icmp.o \
|
| 19 | ipv4.o \
|
| 20 | ipv6.o \
|
| 21 | config.o \
|
| 22 | dns64.o \
|
| 23 | logging.o \
|
| 24 | getaddr.o \
|
| 25 | netlink_callbacks.o \
|
| 26 | netlink_msg.o \
|
| 27 | setif.o \
|
| 28 | mtu.o \
|
| 29 | tun.o \
|
| 30 | ring.o \
|
| 31 | config_utils.o \
|
| 32 | ifc_utils.o \
|
| 33 | arc4random.o \
|
| 34 | load_file.o \
|
| 35 | getentropy.o
|
| 36 |
|
| 37 |
|
| 38 | #*******************************************************************************
|
| 39 | # include path
|
| 40 | #*******************************************************************************
|
| 41 | EXCFLAGS = -I$(zte_lib_path)/libnl/install/include/libnl3 -I$(zte_lib_path)/libnl/install
|
| 42 | CFLAGS += -DKEYSTREAM_ONLY -g
|
| 43 | CFLAGS += -I. $(EXCFLAGS)
|
| 44 |
|
| 45 | #*******************************************************************************
|
| 46 | # library
|
| 47 | #*******************************************************************************
|
| 48 | EXLDFLAGS = -L$(zte_lib_path)/libnl/install/lib
|
| 49 | LDLIBS += -lpthread
|
| 50 | LDLIBS += -lnl-3 $(EXLDFLAGS)
|
| 51 |
|
| 52 |
|
| 53 | #*******************************************************************************
|
| 54 | # library path
|
| 55 | #*******************************************************************************
|
| 56 | #LDLIBS += -L$(LIB_DIR)/libnvram
|
| 57 |
|
| 58 | #*******************************************************************************
|
| 59 | # targets
|
| 60 | #*******************************************************************************
|
| 61 | all: $(EXEC)
|
| 62 |
|
| 63 | $(EXEC): $(OBJS)
|
| 64 | $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS$(LDLIBS_$@))
|
| 65 |
|
| 66 | romfs:
|
| 67 | cp $(EXEC) $(EXEC).elf
|
| 68 | $(ROMFSINST) $(EXEC) /bin/$(EXEC)
|
| 69 | $(ROMFSINST) ./clatd.conf /etc/clatd.conf
|
| 70 |
|
| 71 | clean:
|
| 72 | -rm -f $(EXEC) *.elf *.gdb *.o
|
| 73 |
|