PROG = 		gcsf
CC = 		gcc
CFLAGS = 	-O3
LDFLAGS =	-w
INCLUDES =	-I.
LIBS = 		-lm
EXEPATH = 	.
OBJ =		forces.o main.o read_coords.o \
                read_parameters.o write_coords.o \
		move.o misc.o modn.o displace.o setup.o \
		getfirst.o averages.o sum.o relax.o \
		write_veldis.o micutc.o

gcmd:	layers.h global.h $(OBJ)
	$(CC) -w -o $(EXEPATH)/$(PROG) $(OBJ) -lm

$(OBJ):	layers.h global.h

.c.o: 	layers.h global.h
	$(CC) -c $(CFLAGS) $(INCLUDES) $*.c

clean:
	rm -f *.o *~ gcmd
