X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=Makefile;h=e804abe60e373ce0fbc7c7454dcad3638a6a7483;hb=1cf0f1ebfbd5b5a621af2a49ac0328fd0cec4bf4;hp=a1164073785d530bd821add454094e8f05198f86;hpb=7a48489bbc0cfafdc2a55b0e479454f8d8c965ae;p=blerg.git diff --git a/Makefile b/Makefile index a116407..e804abe 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,26 @@ -CFLAGS = -g -LIBS = +CFLAGS ?= -g +INCLUDES = -I. -Idatabase -Imisc -Ilibmicrohttpd-0.9.3/src/include -Iyajl/build/yajl-1.0.11/include +LDFLAGS ?= +LIBDIRS = -Llibmicrohttpd-0.9.3/src/daemon/.libs -Lyajl/build/yajl-1.0.11/lib -targets = blerg.a blergtool tag_test -blerg_a_objects = database.o tags.o -blergtool_objects = blergtool.o blerg.a +targets = blerg.a blergtool http_blerg +blerg_a_objects = database/database.o database/tags.o +blergtool_objects = tools/blergtool.o blerg.a +http_blerg_objects = http/http_blerg.o http/canned_responses.o misc/auth.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) blerg.a: $(blerg_a_objects) ar rcu $@ $(blerg_a_objects) blergtool: $(blergtool_objects) - gcc $^ -o $@ + gcc $(LDFLAGS) $^ -o $@ + +http_blerg: $(http_blerg_objects) + gcc $(LIBDIRS) $(LDFLAGS) $(http_blerg_objects) -lpthread -lmicrohttpd -lyajl_s -o $@ %.o: %.c - gcc $(CFLAGS) $(LIBS) -c $< -o $@ + gcc $(INCLUDES) $(CFLAGS) -c $< -o $@