#******************************************************************************* | |
# include ZXIC application makefile | |
#******************************************************************************* | |
include $(COMMON_MK) | |
#******************************************************************************* | |
# execute | |
#******************************************************************************* | |
EXEC = clatd | |
#******************************************************************************* | |
# objects | |
#******************************************************************************* | |
OBJS = clatd.o \ | |
dump.o \ | |
checksum.o \ | |
translate.o \ | |
icmp.o \ | |
ipv4.o \ | |
ipv6.o \ | |
config.o \ | |
dns64.o \ | |
logging.o \ | |
getaddr.o \ | |
netlink_callbacks.o \ | |
netlink_msg.o \ | |
setif.o \ | |
mtu.o \ | |
tun.o \ | |
ring.o \ | |
config_utils.o \ | |
ifc_utils.o \ | |
arc4random.o \ | |
load_file.o \ | |
getentropy.o | |
#******************************************************************************* | |
# include path | |
#******************************************************************************* | |
EXCFLAGS = -I$(zte_lib_path)/libnl/install/include/libnl3 -I$(zte_lib_path)/libnl/install | |
CFLAGS += -DKEYSTREAM_ONLY -g | |
CFLAGS += -I. $(EXCFLAGS) | |
#******************************************************************************* | |
# library | |
#******************************************************************************* | |
EXLDFLAGS = -L$(zte_lib_path)/libnl/install/lib | |
LDLIBS += -lpthread | |
LDLIBS += -lnl-3 $(EXLDFLAGS) | |
#******************************************************************************* | |
# library path | |
#******************************************************************************* | |
#LDLIBS += -L$(LIB_DIR)/libnvram | |
#******************************************************************************* | |
# targets | |
#******************************************************************************* | |
all: $(EXEC) | |
$(EXEC): $(OBJS) | |
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS$(LDLIBS_$@)) | |
romfs: | |
cp $(EXEC) $(EXEC).elf | |
$(ROMFSINST) $(EXEC) /bin/$(EXEC) | |
$(ROMFSINST) ./clatd.conf /etc/clatd.conf | |
clean: | |
-rm -f $(EXEC) *.elf *.gdb *.o | |