#
# This file is part of Sargasso, http://zamez.org/sargasso
# Licensed under the GNU General Public License,
#                http://www.opensource.org/licenses/gpl-license
#

OBJECTS = feed.o sargasso.o
HEADERS = feed.h

WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wcast-qual \
	-Wcast-align -Wwrite-strings -Wstrict-prototypes \
	-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
	-Wnested-externs -Winline -Wno-unused-parameter -Wuninitialized

CC = /home/riscos/cross/bin/gcc
CFLAGS = -std=c9x -D_BSD_SOURCE -D_POSIX_C_SOURCE -Driscos -DBOOL_DEFINED -O \
	$(WARNFLAGS) -I/home/riscos/env/include \
	-I/home/riscos/env/include/libxml2 -I.. -mpoke-function-name
LDFLAGS = -L/home/riscos/env/lib -lxml2 -lucurl -lcares -lz -loslib -lrufl

!Sargasso/!RunImage,ff8: $(OBJECTS)
	$(CC) -o $@ $(LDFLAGS) $^

%.o : %.c $(HEADERS)
	@echo "==> $<"
	@$(CC) -o $@ -c $(CFLAGS) $<

clean:
	-rm *.o !Sargasso/!RunImage,ff8