projects
/
blerg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix some memory/fd leaks for tag searching and empty account listing
[blerg.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
c0050db
..
137844b
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,25
+1,26
@@
-CFLAGS = -g
-LIBS =
+CFLAGS ?= -g
+INCLUDES = -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
+targets = blerg.a blergtool
http_blerg
blerg_a_objects = database.o tags.o
blergtool_objects = blergtool.o blerg.a
blerg_a_objects = database.o tags.o
blergtool_objects = blergtool.o blerg.a
-
-tag_test_objects = tag_test.o tags.o
+http_blerg_objects = http_blerg.o canned_responses.o auth.o blerg.a
all: $(targets)
clean:
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)
blerg.a: $(blerg_a_objects)
ar rcu $@ $(blerg_a_objects)
blergtool: $(blergtool_objects)
- gcc $^ -o $@
+ gcc $
(LDFLAGS) $
^ -o $@
-
tag_test: $(tag_test
_objects)
- gcc $
^
-o $@
+
http_blerg: $(http_blerg
_objects)
+ gcc $
(LIBDIRS) $(LDFLAGS) $(http_blerg_objects) -lpthread -lmicrohttpd -lyajl_s
-o $@
%.o: %.c
%.o: %.c
- gcc $(
CFLAGS) $(LIB
S) -c $< -o $@
+ gcc $(
INCLUDES) $(CFLAG
S) -c $< -o $@