wrote a small Makefile
authorpk910 <philipp@zoelle1.de>
Fri, 12 Aug 2011 14:42:03 +0000 (16:42 +0200)
committerpk910 <philipp@zoelle1.de>
Fri, 12 Aug 2011 14:45:08 +0000 (16:45 +0200)
Makefile
main.c

index 352713ba89a134596fefb779bac51cfaa4d2fb06..d61ee2159199ed1e54012170d14c1c3586bdb366 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,16 @@
-CFLAGS=-O0 -g -Wall -Wshadow -Werror
+CFLAGS=-Wall -Wshadow -Werror
 
 all:
-       gcc -o neonserv -O0 -g -Wall main.c -Wshadow -Werror
+       gcc -g -O2 -I. -c IRCEvents.c -o IRCEvents.o ${CFLAGS}
+       gcc -g -O2 -I. -c main.c -o main.o ${CFLAGS}
+       gcc -g -O2 -I. -c ChanNode.c -o ChanNode.o ${CFLAGS}
+       gcc -g -O2 -I. -c IRCParser.c -o IRCParser.o ${CFLAGS}
+       gcc -g -O2 -I. -c ClientSocket.c -o ClientSocket.o ${CFLAGS}
+       gcc -g -O2 -I. -c UserNode.c -o UserNode.o ${CFLAGS}
+       gcc -g -O2 -I. -c ChanUser.c -o ChanUser.o ${CFLAGS}
+       gcc -g -O2 -I. -c WHOHandler.c -o WHOHandler.o ${CFLAGS}
 
-library:
-       gcc -o libneonserv.so
+install:
+       gcc -g -O0 -I. -o neonserv *.o ${CFLAGS}
 
 binary:
\ No newline at end of file
diff --git a/main.c b/main.c
index cbba30f8f1d4783625cf0566dbd77394bd711100..536fb4c4d463d9eaa7c5e3a24349d5742d676e2b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -4,15 +4,6 @@
 #include "UserNode.h"
 #include "IRCEvents.h"
 
-//all c files - so we don't need a big Makefile right now :D
-#include "ClientSocket.c"
-#include "IRCParser.c"
-#include "UserNode.c"
-#include "ChanNode.c"
-#include "ChanUser.c"
-#include "IRCEvents.c"
-#include "WHOHandler.c"
-
 void just_test_it() {
     struct UserNode *user;
     struct ClientSocket *client;