#	This is Linux makefile for FPGA load. 
#	All source code for Windows and Linux versions are the same except for 
#	the API functions. Windows version uses sicommon_plx_win.cpp while the 
#	Linux version uses sicommon_plx_lnx.cpp.
#

INCLUDEDIR = ../common
CFLAGS = -Wall -I$(INCLUDEDIR) -DLINUX
CC=gcc

TARGET = PLX_FPGALoad.out

release:
#	1.compile all files
	$(CC) -c $(CFLAGS) ../../common/configfpga_plx9054.c
	$(CC) -c $(CFLAGS) ../../../../../../common_ddk/os_lnx.c
	$(CC) -c $(CFLAGS) ../plx_fpgaload.c
	$(CC) -c $(CFLAGS) ../../../../../common/sicommon_plx_lnx.c
	
#	2.link object files to generate executable
	$(CC) -o $(TARGET) *.o

debug:
#	1.compile all files
	$(CC) -c $(CFLAGS) -g ../../common/configfpga_plx9054.cpp
	$(CC) -c $(CFLAGS) -g ../plx_fpgaload.cpp
	$(CC) -c $(CFLAGS) -g ../../../../../common/sicommon_plx_lnx.cpp
	
#	2.link object files to generate executable
	$(CC) -o $(TARGET) *.o
			
clean:
	rm -f *.o *~ core .depend $(TARGET)
	
	
