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/] [wb_test/] [src/] [Makefile] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dsmv
#
2
#change this makefile for your target...
3
#
4
 
5
PHONY = clean
6
TARGET_NAME = wb_test
7
 
8
all: $(TARGET_NAME)
9
 
10
ROOT_DIR = $(shell pwd)
11
 
12
CC = $(CROSS_COMPILE)g++
13
LD = $(CROSS_COMPILE)g++
14
 
15
CFLAGS := -D__LINUX__ -g -Wall -I./board -I./pex -I./work -I./utils
16
LFLAGS := -Wl -ldl -lrt -lpthread
17
SRCDIR := board pex work utils
18
#SRCFILE := $(wildcard *.cpp) $(wildcard $(SRCDIR)/*.cpp)
19
SRCFILE := $(wildcard *.cpp)
20
SRCFILE += $(wildcard pex/*.cpp) $(wildcard board/*.cpp) $(wildcard work/*.cpp) $(wildcard utils/*.cpp)
21
OBJFILE := $(patsubst %.cpp,%.o, $(SRCFILE))
22
 
23
$(TARGET_NAME): $(OBJFILE)
24
        $(LD) -o $(TARGET_NAME) $(notdir $^) $(LFLAGS)
25
 
26
#       rm -f *.o *.d *~ core
27
        mv $(TARGET_NAME) ../bin
28
        @echo DONE...
29
 
30
%.o: %.cpp
31
        $(CC) $(CFLAGS) -c -MD $<
32
 
33
include $(wildcard *.d)
34
 
35
 
36
clean:
37
        rm -f *.o *~ core
38
        rm -f *.d *~ core
39
        rm -f $(TARGET_NAME)
40
 
41
distclean:
42
        rm -f *.o *~ core
43
        rm -f *.d *~ core
44
        rm -f $(TARGET_NAME)
45
 
46
src:
47
        @echo $(SRCFILE)
48
        @echo $(OBJFILE)

powered by: WebSVN 2.1.0

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