aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 16 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index cf55989..f48d1f0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,15 @@
# first entries are for gnu make, 2nd for BSD make. see http://lists.uzbl.org/pipermail/uzbl-dev-uzbl.org/2009-July/000177.html
-CFLAGS:=-std=c99 $(shell pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -lgthread-2.0 -DCOMMIT="\"$(shell ./hash.sh)\"" $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic
-CFLAGS!=echo -std=c99 `pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -ggdb -Wall -W -DARCH='"\""'`uname -m`'"\""' -lgthread-2.0 -DCOMMIT='"\""'`./hash.sh`'"\""' $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic
+CFLAGS:=-std=c99 $(shell pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -ggdb -Wall -W -DARCH="\"$(shell uname -m)\"" -lgthread-2.0 -DCOMMIT="\"$(shell ./misc/hash.sh)\"" $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic
+CFLAGS!=echo -std=c99 `pkg-config --cflags gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -ggdb -Wall -W -DARCH='"\""'`uname -m`'"\""' -lgthread-2.0 -DCOMMIT='"\""'`./misc/hash.sh`'"\""' $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic
LDFLAGS:=$(shell pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0) -pthread $(LDFLAGS)
LDFLAGS!=echo `pkg-config --libs gtk+-2.0 webkit-1.0 libsoup-2.4 gthread-2.0` -pthread $(LDFLAGS)
-SRC = uzbl-core.c events.c callbacks.c inspector.c
-OBJ = ${SRC:.c=.o}
+SRC = $(wildcard src/*.c)
+HEAD = $(wildcard src/*.h)
+TOBJ = $(SRC:.c=.o)
+OBJ = $(foreach obj, $(TOBJ), $(notdir $(obj)))
all: uzbl-browser options
@@ -25,9 +27,9 @@ options:
@${CC} -c ${CFLAGS} $<
@echo ... done.
-${OBJ}: uzbl-core.h events.h callbacks.h inspector.h config.h
+${OBJ}: ${HEAD}
-uzbl-core: ${OBJ}
+uzbl-core: ${TOBJ} # why doesn't ${OBJ} work?
@echo
@echo LINKING object files
@${CC} -o $@ ${OBJ} ${LDFLAGS}
@@ -59,7 +61,7 @@ test-uzbl-core: uzbl-core
./uzbl-core --uri http://www.uzbl.org --verbose
test-uzbl-browser: uzbl-browser
- ./uzbl-browser --uri http://www.uzbl.org --verbose
+ ./src/uzbl-browser --uri http://www.uzbl.org --verbose
test-uzbl-core-sandbox: uzbl-core
make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-uzbl-core
@@ -68,6 +70,7 @@ test-uzbl-core-sandbox: uzbl-core
rm -rf ./sandbox/usr
test-uzbl-browser-sandbox: uzbl-browser
+ make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-uzbl-core
make DESTDIR=./sandbox RUN_PREFIX=`pwd`/sandbox/usr/local install-uzbl-browser
source ./sandbox/env.sh && uzbl-cookie-daemon restart -nv &
source ./sandbox/env.sh && uzbl-event-manager restart -nav &
@@ -93,23 +96,23 @@ install-uzbl-core: all
install -d $(INSTALLDIR)/bin
install -d $(INSTALLDIR)/share/uzbl/docs
install -d $(INSTALLDIR)/share/uzbl/examples
- cp -rp docs $(INSTALLDIR)/share/uzbl/
- cp -rp config.h $(INSTALLDIR)/share/uzbl/docs/
- cp -rp examples $(INSTALLDIR)/share/uzbl/
+ cp -rp docs $(INSTALLDIR)/share/uzbl/
+ cp -rp src/config.h $(INSTALLDIR)/share/uzbl/docs/
+ cp -rp examples $(INSTALLDIR)/share/uzbl/
install -m755 uzbl-core $(INSTALLDIR)/bin/uzbl-core
install -m644 AUTHORS $(INSTALLDIR)/share/uzbl/docs
install -m644 README $(INSTALLDIR)/share/uzbl/docs
sed -i 's#^set prefix.*=.*#set prefix = $(RUN_PREFIX)#' $(INSTALLDIR)/share/uzbl/examples/config/uzbl/config
-install-uzbl-browser: install-uzbl-core
+install-uzbl-browser:
install -d $(INSTALLDIR)/bin
- install -m755 uzbl-browser $(INSTALLDIR)/bin/uzbl-browser
+ install -m755 src/uzbl-browser $(INSTALLDIR)/bin/uzbl-browser
install -m755 examples/data/uzbl/scripts/uzbl-cookie-daemon $(INSTALLDIR)/bin/uzbl-cookie-daemon
install -m755 examples/data/uzbl/scripts/uzbl-event-manager $(INSTALLDIR)/bin/uzbl-event-manager
sed -i 's#^PREFIX=.*#PREFIX=$(RUN_PREFIX)#' $(INSTALLDIR)/bin/uzbl-browser
sed -i "s#^PREFIX = .*#PREFIX = '$(RUN_PREFIX)'#" $(INSTALLDIR)/bin/uzbl-event-manager
-install-uzbl-tabbed: install-uzbl-browser
+install-uzbl-tabbed:
install -d $(INSTALLDIR)/bin
install -m755 examples/data/uzbl/scripts/uzbl-tabbed $(INSTALLDIR)/bin/uzbl-tabbed