.EXPORT_ALL_VARIABLES:

EXEC = ws
OBJS = main.o initialise.o parse.o build.o tools.o send.o \
	ipc.o list_manager.o debug.o
CEES = main.c initialise.c parse.c build.c tools.c send.c \
        ipc.c list_manager.c debug.c memwatch.c

all:
	make -f Makefile.NETtel

lin:
	make -f Makefile.Linux

elf:
	make -f Makefile.ELF

romfs:
	$(ROMFSINST) /bin/$(EXEC)

clean:
	-rm -f $(EXEC) *.gdb *.elf *.o core

h:
	mv common_structures.h common_structures.h.tmp
	mv memwatch.c memwatch.c.tmp
	mv memwatch.h memwatch.h.tmp
	rm -f *.h
	cfunctions -i -m *.c
	mv  common_structures.h.tmp common_structures.h
	mv memwatch.c.tmp  memwatch.c
	mv memwatch.h.tmp memwatch.h

debug:
	rm -f memwatch.log 
	gcc -g -DMEMWATCH -DMW_STDIO $(CEES) -o ws
