diff options
author | mutantturkey <crazycal00@gmail.com> | 2010-04-21 11:25:42 -0400 |
---|---|---|
committer | mutantturkey <crazycal00@gmail.com> | 2010-04-21 11:25:42 -0400 |
commit | 228cbb68500f24ea5e19b9d7a90694c4eac754df (patch) | |
tree | 3d8058fb804c3c27944b490206101f21b5d715c4 | |
parent | 6aef420359de54cdb290a8b15faaf8f1fe69af8b (diff) |
makefile & config.mk
-rw-r--r-- | Makefile | 51 | ||||
-rw-r--r-- | config.mk | 28 |
2 files changed, 79 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7bd468f --- /dev/null +++ b/Makefile @@ -0,0 +1,51 @@ +# surf - simple browser +# See LICENSE file for copyright and license details. + +include config.mk + +SRC = sb.c +OBJ = ${SRC:.c=.o} + +all: options sb + +options: + @echo sb build options: + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + @echo "CC = ${CC}" + +.c.o: + @echo CC $< + @${CC} -c ${CFLAGS} $< + +${OBJ}: config.mk + + +sb: ${OBJ} + @echo CC -o $@ + @${CC} -o $@ sb.o ${LDFLAGS} + +clean: + @echo cleaning + @rm -f sb ${OBJ} sb-${VERSION}.tar.gz + +dist: clean + @echo creating dist tarball + @mkdir -p sb-${VERSION} + @cp -R Makefile config.mk ${SRC} sb-${VERSION} + @tar -cf sb-${VERSION}.tar sb-${VERSION} + @gzip sb-${VERSION}.tar + @rm -rf sb-${VERSION} + +install: all + @echo installing executable file to ${DESTDIR}${PREFIX}/bin + @mkdir -p ${DESTDIR}${PREFIX}/bin + @cp -f sb ${DESTDIR}${PREFIX}/bin + @chmod 755 ${DESTDIR}${PREFIX}/bin/sb + +uninstall: + @echo removing executable file from ${DESTDIR}${PREFIX}/bin + @rm -f ${DESTDIR}${PREFIX}/bin/sb + + +.PHONY: all options clean dist install uninstall diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..316df10 --- /dev/null +++ b/config.mk @@ -0,0 +1,28 @@ +# mocicon version +VERSION = 0.1.4 + +# Customize below to fit your system + +# paths +PREFIX = /usr +MANPREFIX = ${PREFIX}/share/man + + +# includes and libs + +GTKINC=$(shell pkg-config --cflags gtk+-2.0 webkit-1.0) +GTKLIB=$(shell pkg-config --libs gtk+-2.0 webkit-1.0 ) + +INCS = -I. -I/usr/include ${GTKINC} +LIBS = -L/usr/lib -lc ${GTKLIB} +# flags +CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} +CFLAGS = -std=c99 -O2 ${INCS} ${CPPFLAGS} +LDFLAGS = -s ${LIBS} + +# Solaris +#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" +#LDFLAGS = ${LIBS} + +# compiler and linker +CC = cc |