OpenCores
URL https://opencores.org/ocsvn/1g_ethernet_dpi/1g_ethernet_dpi/trunk

Subversion Repositories 1g_ethernet_dpi

[/] [1g_ethernet_dpi/] [tags/] [v0.0/] [sw/] [dev/] [test_bfm/] [Makefile] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 kuzmi4
#
2
# makefile
3
#
4
 
5
#
6
# TBD
7
#
8
 
9
TARGET_NAME = test_bfm
10
 
11
all: clean $(TARGET_NAME)
12
 
13
CC = g++ -xc
14
CPP= g++ -xc++
15
LD = g++
16
OBJDUMP = objdump
17
DEFAULT_CP := cp -f
18
DEFAULT_MKDIR := mkdir -p
19
DEFAULT_RM := rm -rf
20
 
21
MSIM_INCLUDES ?= /opt/modelsim/modeltech/include
22
 
23
INCDIR := ./ \
24
 $(MSIM_INCLUDES) \
25
 ./dpi \
26
 ./ether
27
 
28
INCLUDE := $(addprefix -I, $(INCDIR))
29
CFLAGS := -DMSIM
30
CFLAGS := -g
31
CFLAGS += $(INCLUDE)
32
 
33
C_SRCS := $(wildcard *.c)
34
C_SRCS += $(wildcard ./ether/*.c)
35
 
36
OBJFILE_C := $(patsubst %.c,%.o, $(C_SRCS))
37
 
38
$(TARGET_NAME): $(OBJFILE_C)
39
        echo $(MSIM_INCLUDES)
40
        @echo C_SRCS: $(C_SRCS)
41
        $(LD) -shared -o $(TARGET_NAME).so $(notdir $^) $(LFLAGS) $(LIBRARIES)
42
        $(OBJDUMP) -S -d $(TARGET_NAME).so > $(TARGET_NAME).objdump
43
        rm -f *.o *~ core
44
        rm -f *.d *~ core
45
        @echo DONE: DPI-C so-lib
46
 
47
%.o: %.c
48
        @echo Compiling $<:
49
        $(CC) $(CFLAGS) $(LIBRARIES) -fPIC -c $<
50
 
51
clean:
52
        @echo clean:
53
        $(DEFAULT_RM) *.o *~ core
54
        $(DEFAULT_RM) *.d *~ core
55
        $(DEFAULT_RM) *.objdump
56
        $(DEFAULT_RM) *.pcap
57
        $(DEFAULT_RM) $(TARGET_NAME).so

powered by: WebSVN 2.1.0

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