X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=Makefile;h=709b6b95130f448680f7e412343379d8186688b1;hb=453451e03c0e8295031656671eb92fa8b8b0779d;hp=a1164073785d530bd821add454094e8f05198f86;hpb=7a48489bbc0cfafdc2a55b0e479454f8d8c965ae;p=blerg.git diff --git a/Makefile b/Makefile index a116407..709b6b9 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,30 @@ -CFLAGS = -g +libmicrohttpd_a = libmicrohttpd-0.9.3/src/daemon/.libs/libmicrohttpd.a + +CFLAGS = -g -Ilibmicrohttpd-0.9.3/src/include LIBS = -targets = blerg.a blergtool tag_test +targets = blerg.a blergtool http_blerg blerg_a_objects = database.o tags.o blergtool_objects = blergtool.o blerg.a +http_blerg_objects = http_blerg.o blerg.a all: $(targets) clean: - rm -f $(targets) $(blerg_a_objects) $(blergtool_objects) + rm -f $(targets) $(blerg_a_objects) $(blergtool_objects) $(http_blerg_objects) + -cd libmicrohttpd-0.9.3 && make distclean blerg.a: $(blerg_a_objects) ar rcu $@ $(blerg_a_objects) +$(libmicrohttpd_a): + cd libmicrohttpd-0.9.3 && ./configure --disable-https --disable-shared && make + blergtool: $(blergtool_objects) gcc $^ -o $@ +http_blerg: $(http_blerg_objects) $(libmicrohttpd_a) + gcc $(http_blerg_objects) -lpthread $(libmicrohttpd_a) -o $@ + %.o: %.c gcc $(CFLAGS) $(LIBS) -c $< -o $@