修复多进程调用时程序崩溃的bug
修改: Makefile 修改: nicinfo_shm.c Signed-off-by: 张家岭 <jlzhang@linx-info.com>
This commit is contained in:
@@ -6,12 +6,15 @@ include $(DEFAULTS)
|
||||
|
||||
all:sys_nicmonitor libnic_shm.so test
|
||||
|
||||
CFLAGS += -Wall -Wformat=2 -Wno-format-extra-args -Wformat-security -Wformat-nonliteral #-g
|
||||
#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.c
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user