Permalink
Browse files

irc client-server

  • Loading branch information...
1 parent ec1911d commit 5c3f660f5c873cd6dea6622324cd626540e0b773 @SylvainGBR committed Jun 8, 2012
Showing with 207 additions and 138 deletions.
  1. +51 −4 Makefile
  2. +156 −134 actorssg.ml
View
@@ -1,6 +1,53 @@
-SOURCES = my_queue.ml actorssg.ml test.ml
-EXE = actorssg
+SOURCES = my_queue.ml actors.ml actorssg.ml
+EXEC1 = client
+EXEC2 = server
+CAMLC = ocamlc
+CAMLOPT = ocamlopt
+CAMLDEP = ocamldep
+LIBS=$(WITHUNIX) $(WITHTHREADS)
+WITHUNIX =unix.cma
+WITHTHREADS =-thread threads.cma
-all:
+# opt : $(EXEC1).opt
+# OBJS = $(SOURCES2:.ml=.cmo)
+# OPTOBJS = $(SOURCES:.ml=.cmx)
- ocp-ocamlc -thread unix.cma threads.cma -o $(EXE) $(SOURCES)
+CLIENT_OBJS=$(SOURCES:.ml=.cmo) client.cmo
+SERVER_OBJS=$(SOURCES:.ml=.cmo) server.cmo
+
+all: $(EXEC1) $(EXEC2)
+
+$(EXEC1): $(CLIENT_OBJS)
+ $(CAMLC) -o $(EXEC1) $(LIBS) $(CLIENT_OBJS)
+
+$(EXEC2): $(SERVER_OBJS)
+ $(CAMLC) -o $(EXEC2) $(LIBS) $(SERVER_OBJS)
+
+# $(EXEC1).opt: $(OPTOBJS)
+# $(CAMLOPT) -o $(EXEC1) $(LIBS:.cma=.cmxa) $(OPTOBJS)
+
+# $(EXEC2).opt: $(OPTOBJS)
+# $(CAMLOPT) -o $(EXEC2) $(LIBS:.cma=.cmxa) $(OPTOBJS)
+
+.SUFFIXES:
+.SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly
+
+.ml.cmo:
+ $(CAMLC) $(LIBS) -c $<
+
+.mli.cmi:
+ $(CAMLC) -c $<
+
+.ml.cmx:
+ $(CAMLOPT) -c $<
+clean:
+ rm -f *.cm[iox] *~ .*~ #*#
+ rm -f $(EXEC1)
+ rm -f $(EXEC1).opt
+ rm -f $(EXEC2)
+ rm -f $(EXEC2).opt
+
+depend: $(SOURCE)
+ $(CAMLDEP) *.mli *.ml > .depend
+
+include .depend
Oops, something went wrong.

0 comments on commit 5c3f660

Please sign in to comment.