aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3f82144
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+POSTGRESQL ?= $(HOME)/opt/postgresql-git
+
+PG_CPPFLAGS = -Imongoose -Ilibebb
+SHLIB_LINK = -lev
+
+MODULE_big = httpd
+OBJS=httpd.o libebb/libebb.a
+# mongoose/mongoose.o
+
+PG_CONFIG = $(POSTGRESQL)/bin/pg_config
+PGXS := $(shell $(PG_CONFIG) --pgxs)
+include $(PGXS)
+
+httpd.o: httpd.c
+libebb/libebb.a:
+ $(MAKE) -C libebb LIBS=-lev
+
+# Utility targets
+
+reinitdb:
+ rm -rf data
+ $(MAKE) initdb
+
+initdb:
+ $(POSTGRESQL)/bin/initdb -D data -E utf8
+ echo "port=5433" >> data/postgresql.conf
+ echo "shared_preload_libraries='httpd'" >> data/postgresql.conf
+
+run:
+ $(POSTGRESQL)/bin/postgres -D data