diff -r 33e464fd6773 -r 12d5361e7472 Makefile --- a/Makefile Thu Aug 07 20:28:06 2008 +0300 +++ b/Makefile Fri Aug 08 00:15:29 2008 +0300 @@ -1,38 +1,106 @@ -LDFLAGS = -Llib/libevent-dev/lib -levent -lpng -pthread -CFLAGS = -Wall -g -Ilib/libevent-dev/include -std=gnu99 - -EXECS = file_main web_main node_main - -all: web_main file_main node_main - -common.o: common.c common.h -http.o: http.c http.h common.h -config.o: config.c config.h -socket.o: socket.c socket.h config.h common.h +LIBEVENT_HEADERS = lib/libevent-dev/include +LIBEVENT_LIBRARY = lib/libevent-dev/lib +DEFINES = -remote_node.o: remote_node.c remote_node.h common.h render_net.h socket.h config.h -remote_pool.o: remote_pool.c remote_pool.h common.h -render.o: render.c render.h common.h -render_remote.o: render_remote.c render_remote.h common.h socket.h remote_node.h remote_pool.h -render_png.o: render_png.c render_png.h common.h -render_raw.o: render_raw.c render_raw.h common.h -render_local.o: render_local.c render_local.h common.h render_png.h render_raw.h render_mandelbrot.h -render_multi.o: render_multi.c render_multi.h render_remote.o common.h -render_mandelbrot.o: render_mandelbrot.c render_mandelbrot.h common.h -render_slices.o: render_slices.c render_slices.h common.h -render_threads.o: render_threads.c render_threads.h common.h -render_thread.o: render_thread.c render_thread.h common.h render_local.h -tile.o: tile.c tile.h render.h render_struct.h -static.o: static.c static.h common.h +LDFLAGS = -L${LIBEVENT_LIBRARY} -levent -lpng -pthread -lpcl +CFLAGS = -Wall -g -I${LIBEVENT_HEADERS} ${DEFINES} -std=gnu99 -file_main.o: file_main.c -node_main.o: node_main.c common.h render.h render_struct.h render_thread.h render_thread_struct.h render_net.h socket.h -web_main.o: web_main.c common.h render.h render_struct.h remote_node.h remote_pool.h render_remote.h config.h +SRCS = *.c cache/*.c cache/engines/*.c +OBJS = *.o +EXECS = file_main web_main node_main cache_test + +all: depend ${EXECS} file_main: file_main.o common.o render.o render_raw.o render_png.o render_local.o render_mandelbrot.o node_main: node_main.o common.o config.o socket.o render.o render_thread.o render_local.o render_png.o render_raw.o render_mandelbrot.o -web_main: web_main.o common.o config.o socket.o http.o render.o render_png.o remote_node.o remote_pool.o render_remote.o render_multi.o render_slices.o tile.o static.o +web_main: web_main.o common.o config.o socket.o http.o render.o remote_node.o remote_pool.o render_remote.o tile.o static.o +coro_test: coro_test.o common.o config.o socket.o +cache_test: cache_test.o common.o cache/cache.o cache/req.o cache/op.o cache/engines/fs.o clean : - rm *.o ${EXECS} + -rm *.o ${EXECS} +depend: + makedepend -Y -- $(CFLAGS) -- $(SRCS) 2> /dev/null + +# DO NOT DELETE + +cache_test.o: cache.h cache_engines.h common.h +common.o: common.h +config.o: config.h common.h +coro_test.o: lib/libevent-dev/include/event2/util.h +coro_test.o: lib/libevent-dev/include/event-config.h +coro_test.o: lib/libevent-dev/include/event2/event.h +coro_test.o: lib/libevent-dev/include/event2/event_compat.h +coro_test.o: lib/libevent-dev/include/event2/event_struct.h common.h config.h +coro_test.o: socket.h +file_main.o: common.h render.h render_local.h render_png_struct.h +file_main.o: render_png.h render_raw_struct.h render_raw.h +http.o: lib/libevent-dev/include/event2/event_struct.h +http.o: lib/libevent-dev/include/event-config.h +http.o: lib/libevent-dev/include/event2/util.h http.h +http.o: lib/libevent-dev/include/event2/http.h common.h +node_main.o: lib/libevent-dev/include/event2/event.h +node_main.o: lib/libevent-dev/include/event-config.h +node_main.o: lib/libevent-dev/include/event2/util.h +node_main.o: lib/libevent-dev/include/event2/event_struct.h +node_main.o: lib/libevent-dev/include/event2/event_compat.h +node_main.o: lib/libevent-dev/include/event2/bufferevent.h common.h socket.h +node_main.o: config.h render.h render_struct.h render_net.h render_thread.h +node_main.o: render_thread_struct.h +remote_node.o: remote_node.h config.h common.h render_net.h socket.h +remote_pool.o: remote_pool.h remote_node.h config.h common.h +render.o: render_struct.h render.h +render_local.o: common.h render_struct.h render.h render_local.h +render_local.o: render_png_struct.h render_png.h render_raw_struct.h +render_local.o: render_raw.h render_mandelbrot.h +render_mandelbrot.o: common.h render_struct.h render.h render_mandelbrot.h +render_multi.o: common.h render_struct.h render.h render_multi.h +render_multi.o: lib/libevent-dev/include/event2/util.h +render_multi.o: lib/libevent-dev/include/event-config.h +render_multi.o: lib/libevent-dev/include/event2/buffer.h remote_pool.h +render_multi.o: remote_node.h config.h render_remote.h render_slices_struct.h +render_multi.o: render_png_struct.h render_png.h render_slices.h +render_png.o: common.h render_struct.h render.h render_png_struct.h +render_png.o: render_png.h +render_raw.o: common.h render_struct.h render.h render_raw_struct.h +render_raw.o: render_raw.h +render_remote.o: lib/libevent-dev/include/event2/event.h +render_remote.o: lib/libevent-dev/include/event-config.h +render_remote.o: lib/libevent-dev/include/event2/util.h +render_remote.o: lib/libevent-dev/include/event2/event_struct.h +render_remote.o: lib/libevent-dev/include/event2/bufferevent.h +render_remote.o: render_remote.h lib/libevent-dev/include/event2/buffer.h +render_remote.o: render.h remote_pool.h remote_node.h config.h common.h +render_remote.o: render_struct.h render_net.h socket.h +render_slices.o: common.h render_struct.h render.h render_slices_struct.h +render_slices.o: render_png_struct.h render_png.h render_slices.h +render_thread.o: lib/libevent-dev/include/event2/event.h +render_thread.o: lib/libevent-dev/include/event-config.h +render_thread.o: lib/libevent-dev/include/event2/util.h common.h +render_thread.o: render_thread.h render.h render_thread_struct.h +render_thread.o: lib/libevent-dev/include/event2/event_struct.h +render_thread.o: render_struct.h render_local.h render_png_struct.h +render_thread.o: render_png.h render_raw_struct.h render_raw.h +render_threads.o: common.h render_threads.h render.h render_slices_struct.h +render_threads.o: render_struct.h render_png_struct.h render_png.h +render_threads.o: render_slices.h render_mandelbrot.h +socket.o: socket.h config.h common.h +static.o: lib/libevent-dev/include/event2/http.h +static.o: lib/libevent-dev/include/event2/util.h +static.o: lib/libevent-dev/include/event-config.h +static.o: lib/libevent-dev/include/event2/buffer.h static.h common.h +tile.o: tile.h render.h render_struct.h +web_main.o: lib/libevent-dev/include/event2/event.h +web_main.o: lib/libevent-dev/include/event-config.h +web_main.o: lib/libevent-dev/include/event2/util.h +web_main.o: lib/libevent-dev/include/event2/event_compat.h +web_main.o: lib/libevent-dev/include/event2/http.h +web_main.o: lib/libevent-dev/include/event2/event_struct.h common.h http.h +web_main.o: render_struct.h render.h remote_node.h config.h remote_pool.h +web_main.o: render_remote.h lib/libevent-dev/include/event2/buffer.h tile.h +web_main.o: static.h +cache/cache.o: cache.h cache.h cache/engine.h +cache/op.o: cache.h cache.h cache/op.h cache/req.h cache/engine.h common.h +cache/req.o: cache.h cache.h cache/req.h cache/op.h cache/engine.h common.h +cache/engines/fs.o: cache.h cache.h cache/engine.h cache/op.h common.h