From 85bd94abb4fb507b5d230a06f5f7c2b4138110ca Mon Sep 17 00:00:00 2001 From: Robert Manea Date: Fri, 2 Oct 2009 11:15:13 +0200 Subject: split source into multiple files --- Makefile | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 581a005..2989afe 100644 --- a/Makefile +++ b/Makefile @@ -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 + -- cgit v1.2.3