]> Zhao Yanbai Git Server - acecode.git/commitdiff
add test env in main
authorAceVest <zhaoyanbai@126.com>
Wed, 9 Jul 2014 15:32:23 +0000 (23:32 +0800)
committerAceVest <zhaoyanbai@126.com>
Wed, 9 Jul 2014 15:32:23 +0000 (23:32 +0800)
.gitignore [new file with mode: 0644]
learn/test/main.c [new file with mode: 0644]
tools/Makefile
tools/hack/netpeeper/makefile

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..17fbe89
--- /dev/null
@@ -0,0 +1,2 @@
+*.o
+*.out
diff --git a/learn/test/main.c b/learn/test/main.c
new file mode 100644 (file)
index 0000000..8abc499
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * ------------------------------------------------------------------------
+ *   File Name: main.c
+ *      Author: Zhao Yanbai
+ *              Wed Jul  9 23:28:56 2014
+ * Description: none
+ * ------------------------------------------------------------------------
+ */
+#include<stdio.h>
+
+int main(int argc, char *argv[], char *env[]) {
+    unsigned int i;
+    for(i=0; env[i]; ++i)
+        printf("env[%u] %s\n", i, env[i]);
+
+       return 0;
+}
index 0a8a0fd280ddee83d43a8686b8941fb3324c77d4..0b5db244da783e2b1fc208b753adda33fb9662f8 100644 (file)
@@ -11,8 +11,8 @@ DST   = /usr/local/bin/
 
 .PHONY:every
 every: $(BINS)
-       sudo cp $(BINS) $(DST)
-       sudo cp $(SCRIPTS) $(DST)
+       cp $(BINS) $(DST)
+       cp $(SCRIPTS) $(DST)
 .PHONY:clean
 clean:
        rm $(BINS) -f
index a3efcd64aa9ff448d066f0fffc27b2d5848d5b5f..47b815c6a23a0989f90b794765abb95a0ee04beb 100644 (file)
@@ -15,7 +15,7 @@ OBJS = $(patsubst %.c,%.o,$(SOUCE_FILES))
        $(CC) -c $(CFLAGS) $< -o $@
 
 $(TARGET): $(OBJS)
-       gcc -o $@ $^ -lnids -lnet -lpcap  -lgthread-2.0
+       gcc -o $@ $^ -lnids -lnet -lpcap -lpthread
 
 .PHONY:clean
 clean: