

#=========================================================================
# Builders and flags:

CC = gcc
CFLAGS = -g -O3
INCFLAGS = -I/usr/local/include -I/usr/X11R6/include -I.
LDLIBS = -L. -lgr -L/usr/X11R6/lib -lGL -lXext -lX11 -lnsl -ldl -lm

#=========================================================================
# Files:

# All object files.
OBJS = fe2d_adapt.o ebs2d_bin.o

# C sources.
CSRCS = fe2d_adapt.c ebs2d_bin.c


#=========================================================================
# Main targets:

# all: The default rule.
all: grape2d grape2d_p

# clean: Remove the object files.
clean:
	$(RM) $(OBJS)


#=========================================================================
# Implicit rules:

.SUFFIXES:
.SUFFIXES: .c .o

.c.o:
	$(CC) $(INCFLAGS) $(CFLAGS) -c $< -o $@


#=========================================================================
# Explicit rules:

grape2d: $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) $(LDLIBS) -o $@

grape2d_p: fe2d_adapt.o
	$(CC) $(CFLAGS)  fe2d_adapt.o  -D"PRESSURE_VERSION" ebs2d_bin.c $(LDLIBS) -o $@


#=========================================================================
# Dependencies:

