compileargs = -O2 -fbaserel -noixemul -x none -s -m68020
compileargs1 = -O2 -fbaserel -noixemul -g -m68020
libs = -lamiga -lscreennotify -lretina
objects = main.o drawing.o miscfuncs.o volumes.o formattext.o handler.o initclean.o idle.o
addobjects = sprintf_exec.o

tinymeter : main.o drawing.o miscfuncs.o sprintf_exec.o volumes.o formattext.o initclean.o handler.o idle.o
	gcc -o ram:TinyMeter $(compileargs) $(objects) $(addobjects) $(libs)

main.o : main.c includes.h globals.h structs.h
	gcc -c $(compileargs) main.c

drawing.o : drawing.c includes.h structs.h
	gcc -c $(compileargs) drawing.c

miscfuncs.o : miscfuncs.c includes.h structs.h
	gcc -c $(compileargs) miscfuncs.c

volumes.o : volumes.c includes.h structs.h
	gcc -c $(compileargs) volumes.c

formattext.o : formattext.c includes.h structs.h
	gcc -c $(compileargs) formattext.c

initclean.o : initclean.c includes.h structs.h
	gcc -c $(compileargs) initclean.c

handler.o : handler.c includes.h structs.h
	gcc -c $(compileargs) handler.c

idle.o : idle.c
	gcc -c -noixemul -m68000 idle.c

clean :
	rm $(objects)
