This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
av-frag-rssb/src/Makefile

82 lines
2.0 KiB
Makefile
Raw Normal View History

2018-09-29 14:57:32 +08:00
vpath %.a ../lib
vpath %.h ./inc
PAPP_PATH=/home/mesasoft/frag_rssb/
#CFLAGS = -g3 -Wall -fPIC -Werror -O
#CFLAGS = -g3 -Wall -fPIC -O
INCLUDES = -I./inc/
INCLUDES += -I/usr/include/MESA/
2018-12-05 21:01:01 +08:00
INCLUDES += -I./support/hiredisv4/
2018-09-29 14:57:32 +08:00
CFLAGS = -g3 -Wall -fPIC -D__STDC_FORMAT_MACROS
CFLAGS += $(INCLUDES)
2018-12-05 21:01:01 +08:00
ifeq ($(PROJECT), K)
CFLAGS += -DK_PROJECT=1
else ifeq ($(PROJECT), Z)
CFLAGS += -DK_PROJECT=0
else
CFLAGS += -DK_PROJECT=0
endif
2018-12-05 21:01:01 +08:00
ifeq ($(MODE), PIC)
CFLAGS += -DPIC_FUNC=1
TARGET = pic_rssb_maskey
else ifeq ($(MODE), VOIP)
CFLAGS += -DVOIP_FUNC=1
2018-12-05 21:01:01 +08:00
TARGET = voip_rssb_maskey
else
TARGET = av_rssb_maskey
endif
2018-09-29 14:57:32 +08:00
#LDDICTATOR = -Wl,-wrap,malloc -Wl,-wrap,calloc -Wl,-wrap,free -Wl,-wrap,realloc
LDDICTATOR =
CC = g++
CCC = g++
LIB = -L./lib/
LIB += -lsoqav_dedup
#LIB += -lappdetect
LIB += -lrdkafka
LIB += -lssl -lcrypto
LIB += -lMESA_handle_logger -lMESA_prof_load -lmaatframe -lrulescan -lMESA_htable -lMESA_field_stat2 -lpthread -lasmislog -lwiredcfg -lWiredLB
LIB += ./lib/libsifter.a ./lib/libmy_socket.a ./lib/libbusinessman.a ./lib/libMESA_trace.a ./lib/lib_interval_index.a ./lib/lib_MESA_timer.a
#LIB += -lhiredis_vip
LIB += ./lib/libhiredis_vip.a
LIB += ./lib/usm_comm.a
#LIB += ./lib/libdictator_debug.a
LIB_FILE = $(wildcard ../lib/*.a)
SOURCES = $(wildcard *.c)
SOURCESCPP = $(wildcard *.cpp)
OBJECTS = $(SOURCES:.c=.o)
OBJECTSCPP = $(SOURCESCPP:.cpp=.o)
#DEPS = $(SOURCES:.c=.d)
.PHONY:clean all
all:$(TARGET)
$(TARGET):$(OBJECTS) $(OBJECTSCPP) $(LIB_FILE)
#$(CCC) -shared $(CFLAGS) $(OBJECTS) $(LIB) -o $@
$(CCC) $(CFLAGS) $(OBJECTS) $(OBJECTSCPP) $(LIB) $(LDDICTATOR) -o $@
cp $(TARGET) ../bin/
@echo -e "\033[32mFOR SOQ: make MODE=AV/PIC/VOIP \033[0m"
@echo -e "\033[32mFOR NTC: make PROJECT=K MODE=AV/PIC/VOIP \033[0m"
# cp $(TARGET) /home/mesasoft/frag_rssb/
2018-09-29 14:57:32 +08:00
.c.o:
#%.d:%.c
# $(CCC) $< -MM $(INCLUDES) > $@
.cpp.o:
#%.dpp:%.cpp
$(CCC) $(CFLAGS) -c $<
-include $(DEPS)
clean :
rm -f $(OBJECTS) $(DEPS) $(TARGET)