OpenCores
URL https://opencores.org/ocsvn/pcie_ds_dma/pcie_ds_dma/trunk

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [soft/] [linux/] [application/] [board_exam/] [Makefile] - Diff between revs 2 and 6

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 6
Line 1... Line 1...
#
 
#change this makefile for your target...
 
#
 
 
 
PHONY = clean
PHONY = clean
TARGET_NAME = pex_board_test
TARGET_NAME = pex_board_test
 
 
all: $(TARGET_NAME)
all: $(TARGET_NAME)
 
 
ROOT_DIR = $(shell pwd)
BINPATH  := ../..
 
BINDIR  := $(BINPATH)/bin
CC = $(CROSS_COMPILE)g++
LIBPATH  := ../..
LD = $(CROSS_COMPILE)g++
LIBDIR := $(LIBPATH)/lib
 
 
CFLAGS := -D__LINUX__ -g -Wall -I../../driver/pexdrv -I../../common/board -I../../common/pex -I../adm_test/src/utils
CC := $(CROSS_COMPILE)g++
LFLAGS := -Wl
LD := $(CROSS_COMPILE)g++
SRCDIR := ../../common/board ../../common/pex
 
#SRCFILE := $(wildcard *.cpp) $(wildcard $(SRCDIR)/*.cpp)
INCDIR := . \
SRCFILE := $(wildcard *.cpp) $(wildcard ../../common/board/*.cpp)
 ../../driver/pexdrv \
SRCFILE += $(wildcard *.cpp) $(wildcard ../../common/pex/*.cpp)
 ../../common/board \
OBJFILE := $(patsubst %.cpp,%.o, $(SRCFILE))
 ../../common/utils
 
 
$(TARGET_NAME): $(OBJFILE)
INCLUDE := $(addprefix -I, $(INCDIR))
        $(LD) $(LFLAGS) $(notdir $^) -o $(TARGET_NAME)
 
 
#CFLAGS := -D__linux__ -D__VERBOSE__ -g -Wall $(INCLUDE)
 
CFLAGS := -D__linux__ -O2 -Wall $(INCLUDE)
 
LFLAGS := -Wl,-rpath $(LIBDIR) -L"$(LIBDIR)" -lboard -ldl -lpthread
 
 
 
#EXTFILES := ../common/net/net_board.cpp
 
#EXTFILES := ../common/net/netcmn.cpp
 
 
 
$(TARGET_NAME): $(patsubst %.cpp,%.o, $(wildcard *.cpp)) $(EXTFILES)
 
        $(LD) -o $(TARGET_NAME) $(notdir $^) $(LFLAGS)
 
        cp $(TARGET_NAME) $(BINDIR)
        rm -f *.o *~ core
        rm -f *.o *~ core
 
 
%.o: %.cpp
%.o: %.cpp
        $(CC) $(CFLAGS) -c -MD $<
        $(CC) $(CFLAGS) -c -MD $<
 
 
include $(wildcard *.d)
include $(wildcard *.d)
 
 
 
 
 
test:
 
        @echo $(SRC)
 
 
clean:
clean:
        rm -f *.o *~ core
        rm -f *.o *~ core
        rm -f *.d *~ core
        rm -f *.d *~ core
        rm -f $(TARGET_NAME)
        rm -f $(TARGET_NAME)
 
 
distclean:
distclean:
        rm -f *.o *~ core
        rm -f *.o *~ core
        rm -f *.d *~ core
        rm -f *.d *~ core
        rm -f $(TARGET_NAME)
        rm -f $(TARGET_NAME)
 
 
src:
 
        @echo $(SRCFILE)
 
        @echo $(OBJFILE)
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.