diff --git a/Makefile b/Makefile index 80efa60..68b6a9b 100644 --- a/Makefile +++ b/Makefile @@ -40,34 +40,34 @@ COLIB_OBJS=co_epoll.o co_routine.o co_hook_sys_call.o coctx_swap.o coctx.o co_co PROGS = colib example_poll example_echosvr example_echocli example_thread example_cond example_specific example_copystack example_closure example_setenv -all:$(PROGS) +all: $(PROGS) -colib:libcolib.a libcolib.so +colib: libcolib.a libcolib.so libcolib.a: $(COLIB_OBJS) $(ARSTATICLIB) libcolib.so: $(COLIB_OBJS) $(BUILDSHARELIB) -example_echosvr:example_echosvr.o +example_echosvr: example_echosvr.o lib/libcolib.a $(BUILDEXE) -example_echocli:example_echocli.o +example_echocli: example_echocli.o lib/libcolib.a $(BUILDEXE) -example_thread:example_thread.o +example_thread: example_thread.o lib/libcolib.a $(BUILDEXE) -example_poll:example_poll.o +example_poll: example_poll.o lib/libcolib.a $(BUILDEXE) -example_exit:example_exit.o +example_exit: example_exit.o $(BUILDEXE) -example_cond:example_cond.o +example_cond: example_cond.o lib/libcolib.a $(BUILDEXE) -example_specific:example_specific.o +example_specific: example_specific.o lib/libcolib.a $(BUILDEXE) -example_copystack:example_copystack.o +example_copystack: example_copystack.o lib/libcolib.a $(BUILDEXE) -example_setenv:example_setenv.o +example_setenv: example_setenv.o lib/libcolib.a $(BUILDEXE) -example_closure:example_closure.o +example_closure: example_closure.o lib/libcolib.a $(BUILDEXE) dist: clean libco-$(version).src.tar.gz @@ -78,7 +78,7 @@ libco-$(version).src.tar.gz: (cd ..; tar cvf - `cat libco_pub/MANIFEST` | gzip > libco_pub/libco-$(version).src.tar.gz) @(cd ..; rm libco-$(version)) -clean: +clean: $(CLEAN) *.o $(PROGS) rm -fr MANIFEST lib solib libco-$(version).src.tar.gz libco-$(version)