aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormutantturkey <crazycal00@gmail.com>2010-04-21 15:46:13 -0400
committermutantturkey <crazycal00@gmail.com>2010-04-21 15:46:13 -0400
commit8fd2ff4f3a6cc8552cfd7746a773425144f715ad (patch)
tree9e2feab2f83c248623c1ac35633fdb118cf2ecd1 /Makefile
initial stuff
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile51
1 files changed, 51 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