Files
autobuild-tools/code/sys_nicmonitor/Makefile
张家岭 bd18ca0e9e 修复多进程调用时程序崩溃的bug
修改:      Makefile
	修改:      nicinfo_shm.c

Signed-off-by: 张家岭 <jlzhang@linx-info.com>
2019-06-26 13:08:18 +08:00

36 lines
993 B
Makefile

#! /usr/bin/make -f
DEFAULTS = Makefile.config
include $(DEFAULTS)
all:sys_nicmonitor libnic_shm.so test
#CFLAGS += -D TESTINTERVAL -Wall -Wformat=2 -Wno-format-extra-args -Wformat-security -Wformat-nonliteral -O0 -g
CFLAGS += -Wall -Wformat=2 -Wno-format-extra-args -Wformat-security -Wformat-nonliteral -O0 -g
sys_nicmonitor:mnic.o read_netcard.o send_alarm.o
$(CC) -lman -ldotconf -lpthread -o $@ $^
libnic_shm.so:nicinfo_shm.o
$(CC) -fpic -shared -o $@ $^
nicinfo_shm.o:nicinfo_shm.c
$(CC) $(CFLAGS) -fPIC -c $^
test:test.c
gcc -o test test.c -lnic_shm -L=./ -lpthread
runtest:
LD_LIBRARY_PATH=./ ./test bond0 5000 &
clean:
$(RM) *.o
$(RM) libnic_shm.so sys_nicmonitor test
install:
$(MKDIR) -p $(LIBDIR)
$(MKDIR) -p $(BINDIR)
$(MKDIR) -p $(INCDIR)
$(CP) libnic_shm.so $(LIBDIR)
$(CP) sys_nicmonitor $(BINDIR)
$(CP) nicinfo_shm.h $(INCDIR)
uninstall:
$(RM) -f $(LIBDIR)/libnic_shm.so
$(RM) -f $(BINDIR)/sys_nicmonitor
$(RM) -f $(INCDIR)/nicinfo_shm.h