summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2010-09-15 10:57:55 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2010-09-15 10:57:55 (GMT)
commit196cba60336459f242369b9ad3a14aebe0b80c23 (patch)
tree5f4934a2ec48b8a5d70aa5e3e37ee8f485ebeb1f
parentcce953d6a4e0b10915b60411f298ac86c6d0df8f (diff)
downloadalphagen-196cba60336459f242369b9ad3a14aebe0b80c23.tar.gz
alphagen-196cba60336459f242369b9ad3a14aebe0b80c23.tar.bz2
Currently untested port to core build system.
svn path=/trunk/tools/alphagen/; revision=10777
-rw-r--r--Makefile33
-rw-r--r--src/Makefile4
-rw-r--r--src/alphagen.c (renamed from alphagen.c)0
3 files changed, 27 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 6ec4166..91a8024 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,28 @@
-# Makefile for building AlphaGen on RISC OS.
+#
+# Makefile for building AlphaGen
+#
-# Needs NSTools for libpng and libz.
-# http://www.netsurf-browser.org/downloads/other/nstools.zip
-.SUFFIXES: .c .o
-.c.o:
- gcc -I<NSLibs$$Dir>/include -mpoke-function-name -mthrowback -c -O2 $<
+# Component settings
+COMPONENT := alphagen
+COMPONENT_TYPE := binary
+COMPONENT_VERSION := 1.0.0
-SRC = $(wildcard *.c)
+# Setup the tooling
+include build/makefiles/Makefile.tools
-OBJ = $(SRC:.c=.o)
+# Toolchain flags
+WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
+ -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wnested-externs -pedantic
-nslog: $(OBJ)
- gcc -L<NSLibs$$Dir>/lib -lpng -lz -o alphagen $(OBJ)
+# libpng and libz
+ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
+ CFLAGS := $(CFLAGS) -I$(PREFIX)/include
+ LDFLAGS := $(LDFLAGS) -lpng -lz
+endif
+
+# Grab the core makefile
+include build/makefiles/Makefile.top
+
+# Extra installation rules
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..d629b72
--- a/dev/null
+++ b/src/Makefile
@@ -0,0 +1,4 @@
+# Sources
+DIR_SOURCES := alphagen.c
+
+include build/makefiles/Makefile.subdir
diff --git a/alphagen.c b/src/alphagen.c
index 4a3d4e2..4a3d4e2 100644
--- a/alphagen.c
+++ b/src/alphagen.c