diff options
author | Robert Manea <gotmor@gmail.com> | 2009-10-02 11:15:13 +0200 |
---|---|---|
committer | Robert Manea <gotmor@gmail.com> | 2009-10-02 11:15:13 +0200 |
commit | 85bd94abb4fb507b5d230a06f5f7c2b4138110ca (patch) | |
tree | 1ac0d1443f3a7f7c0ad3b8a8ba5c2e13ab67befc /Makefile | |
parent | 93bcfb0d08807a68da314ef844c9cfc9afd07ae9 (diff) |
split source into multiple files
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 28 insertions, 6 deletions
@@ -1,20 +1,40 @@ # 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 -DG_ERRORCHECK_MUTEXES -DCOMMIT="\"$(shell git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic -ggdb3 -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 -DG_ERRORCHECK_MUTEXES -DCOMMIT='"\""'`git log | head -n1 | sed "s/.* //"`'"\""' $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic -ggdb3 +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 git log | head -n1 | sed "s/.* //")\"" $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic -ggdb3 +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='"\""'`git log | head -n1 | sed "s/.* //"`'"\""' $(CPPFLAGS) -fPIC -W -Wall -Wextra -pedantic -ggdb3 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) -all: uzbl-browser +SRC = uzbl-core.c uzbl-events.c +OBJ = ${SRC:.c=.o} + +all: uzbl-browser options + +options: + @echo uzbl-core build options: + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + +.c.o: + @echo Compiling $< + @${CC} -c ${CFLAGS} $< + +${OBJ}: uzbl-core.h uzbl-events.h config.h + +uzbl-core: ${OBJ} + @echo Linking $< + @${CC} -o $@ ${OBJ} ${LDFLAGS} + + uzbl-browser: uzbl-core PREFIX?=$(DESTDIR)/usr/local # When compiling unit tests, compile uzbl as a library first -tests: uzbl-core.o - $(CC) -DUZBL_LIBRARY -shared -Wl uzbl-core.o -o ./tests/libuzbl-core.so +tests: uzbl-core.o uzbl-events.o + $(CC) -DUZBL_LIBRARY -shared -Wl uzbl-core.o uzbl-events.o -o ./tests/libuzbl-core.so cd ./tests/; $(MAKE) test: uzbl-core @@ -40,9 +60,10 @@ test-share-browser: uzbl-browser clean: rm -f uzbl-core rm -f uzbl-core.o + rm -f uzbl-events.o cd ./tests/; $(MAKE) clean -install: +install: all install -d $(PREFIX)/bin install -d $(PREFIX)/share/uzbl/docs install -d $(PREFIX)/share/uzbl/examples @@ -58,3 +79,4 @@ install: uninstall: rm -rf $(PREFIX)/bin/uzbl-* rm -rf $(PREFIX)/share/uzbl + |