# Makefile from mark limkeman
CFILES = io_signa_lx.c
CFILES1= read_pfile_header.c

SOURCES= 	$(CFILES) $(CFILES1)

OBJECTS =	$(CFILES:.c=.o)
OBJECTS1=	$(CFILES:.c=.o) $(CFILES1:.c=.o)

RESULTS1=	read_pfile_header

# C compiler and flags 
# Note: Remove -DLX_SYSTEM to compile for Genesis Based Recon
CC= cc
CFLAGS= -g3 -DLX_SYSTEM -ansi

# libraries and lib paths
LIBS =  -L$(LIBDIR) -L. -L/usr/lib -lc -lm 

# Note: for LX2 the c34 library is not needed - use this lib inlcude line
#       for Genesis based recon...
LDLIBS = -L/usr/lib32 -L/usr/local/lib32 -lm
LIBDIR= $(HOME)/src/EPIRECON/lib

LDFLAGS = -m386

LIBS =  -L$(LIBDIR) $(LDLIBS) -L. -L/usr/lib -lc -lm $(LDFLAGS)

INCLUDES = -I. 

#Note: Change this path for you own environment
INCLUDEDIR= /usr/include  


.SUFFIXES: .o

.c.o:
	$(CC) -c -o $*.o $(CFLAGS) $(INCLUDES) $*.c   #for pfile

#targets
all:	$(RESULTS1)

$(RESULTS1): $(OBJECTS1)
	  $(CC) $(CFLAGS) -o read_pfile_header $(OBJECTS1) $(LIBS)

clean:
	rm -rf $(RESULTS1)  $(OBJECTS1)

