CC=gcc
Executable=Meifang_HW_12
Header=header.h
OFiles=Meifang_HW_12.o cg.o io.o
CFLAGS+=-L/usr/local/lib -lgsl -lgslcblas -Os -o

%.o: %.c $(Header)
	$(CC) -c -o $@ $<

$(Executable):$(OFiles) $(Header)
	gcc -$(CFLAGS) $(Executable) $(OFiles)

clean:
	rm -f Meifang_HW_12
	rm -f *.o
	rm -f *~
