diff options
-rw-r--r-- | Makefile | 33 | ||||
-rw-r--r-- | src/Makefile | 4 | ||||
-rw-r--r-- | src/alphagen.c (renamed from alphagen.c) | 0 |
3 files changed, 27 insertions, 10 deletions
@@ -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 --- /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 |