###variavel###

#macro
SRC= main.c UAS_comm.c UAS_gui.c aux_func.c callbacks.c
PROG=UAS
CC=gcc
DOXY= doxyfile
CFLAGS=-Wall


###fixo###
OBJ=$(SRC:.c=.o)




#makefile


$(PROG): proto $(OBJ) 
	$(CC) $(CFLAGS) $(OBJ) -o $(PROG) `pkg-config --cflags --libs libglade-2.0` -export-dynamic

proto:
	ctags -x $(SRC) |grep function | awk '{for(n=5;n<=NF;n++) printf("%s ",$$n); printf(";\n")}' > proto.h

.c.o:
	#clear
	$(CC) $(CFLAGS) -c `pkg-config --cflags --libs libglade-2.0` $< -o $@

clean:
	rm -f $(PROG)
doc: 
	doxygen $(DOXY) $(SRC)

depend:
	makedepend -Y $(SRC)


# DO NOT DELETE

main.o: header.h proto.h
callbacks.o: header.h proto.h
BS_rs232.o: header.h proto.h
BS_game.o: header.h proto.h
aux_func.o: header.h proto.h
