aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-07-04 18:53:30 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-07-04 18:53:30 +0200
commit85b434ffc8870a592044b29686f6d2f352fe7c45 (patch)
treee3dc7f14437530f48ccb0d7d124f22e74be569fc /Makefile
downloadpgsql-http-bgworker-85b434ffc8870a592044b29686f6d2f352fe7c45.tar.gz
pgsql-http-bgworker-85b434ffc8870a592044b29686f6d2f352fe7c45.tar.bz2
pgsql-http-bgworker-85b434ffc8870a592044b29686f6d2f352fe7c45.tar.xz
pgsql-http-bgworker-85b434ffc8870a592044b29686f6d2f352fe7c45.zip
o Initial import of my PostgreSQL background worker + HTTP experiment.
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