source: libbsdport/bsd_eth_drivers/if_pcn/Makefile @ a8bf95d

B_20100615baselibbsdport-4-10-branch
Last change on this file since a8bf95d was a8bf95d, checked in by Till Straumann <strauman@…>, on Apr 22, 2009 at 10:06:58 PM
  • importing updated version from SLAC as of 20090422
  • Property mode set to 100644
File size: 3.3 KB
Line 
1#
2#  Makefile.leaf,v 1.7 2002/07/22 22:56:09 joel Exp
3#
4# Templates/Makefile.leaf
5#       Template leaf node Makefile
6#
7#
8LIBNAME=libif_pcn.a
9
10LINKS=pci/if_pcnreg.h
11
12# C source names, if any, go here -- minus the .c
13C_PIECES=
14
15C_PIECES+=if_pcn
16
17C_FILES=$(C_PIECES:%=%.c)
18C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
19
20# C++ source names, if any, go here -- minus the .cc
21CC_PIECES=
22CC_FILES=$(CC_PIECES:%=%.cc)
23CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)
24
25H_FILES=
26
27# Assembly source names, if any, go here -- minus the .S
28S_PIECES=
29S_FILES=$(S_PIECES:%=%.S)
30S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o)
31
32SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
33OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
34
35# If your PGMS target has the '.exe' extension, a statically
36# linked application is generated.
37# If it has a '.obj' extension, a loadable module is built.
38#
39#
40ifdef LIBNAME
41LIB=${ARCH}/${LIBNAME}
42else
43PGMS=${ARCH}/if_pcn.obj
44endif
45
46#  List of RTEMS Classic API Managers to be included in the application
47#  goes here. Use:
48#     MANAGERS=all
49# to include all RTEMS Classic API Managers in the application or
50# something like this to include a specific set of managers.
51#     MANAGERS=io event message rate_monotonic semaphore timer
52#
53# UNUSED for loadable modules
54MANAGERS=ALL
55
56ifndef RTEMS_MAKEFILE_PATH
57$(error you need to set the RTEMS_MAKEFILE_PATH environment variable)
58endif
59
60all:
61
62depend: ${LINKS}
63
64include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
65
66include $(RTEMS_CUSTOM)
67ifdef LIBNAME
68include $(RTEMS_ROOT)/make/lib.cfg
69else
70include $(RTEMS_ROOT)/make/leaf.cfg
71endif
72
73#
74# (OPTIONAL) Add local stuff here using +=
75#
76
77#DEFINES  += -DPCN_DEBUG
78CPPFLAGS += -I. -I../libbsdport -I../libbsdport/dummyheaders
79CFLAGS   +=
80
81#
82# CFLAGS_DEBUG_V are used when the `make debug' target is built.
83# To link your application with the non-optimized RTEMS routines,
84# uncomment the following line:
85# CFLAGS_DEBUG_V += -qrtems_debug
86#
87
88LD_PATHS  += 
89LD_LIBS   += 
90LDFLAGS   +=
91
92#
93# Add your list of files to delete here.  The config files
94#  already know how to delete some stuff, so you may want
95#  to just run 'make clean' first to see what gets missed.
96#  'make clobber' already includes 'make clean'
97#
98
99CLEAN_ADDITIONS += 
100CLOBBER_ADDITIONS += pci
101
102all: ${LINKS} ${ARCH} $(SRCS) $(PGMS) ${LIB}
103
104pci/%:%
105        if [ ! -d pci ]; then mkdir -p pci; fi ; ln -s ../$^ $@
106
107#How to make a relocatable object
108$(filter %.obj, $(PGMS)): ${OBJS}
109        $(make-obj)
110
111#How to make an executable (statically linked)
112$(filter %.exe,$(PGMS)): ${LINK_FILES}
113        $(make-exe)
114ifdef ELFEXT
115ifdef XSYMS
116        $(XSYMS) $(@:%.exe=%.$(ELFEXT)) $(@:%.exe=%.sym)
117endif
118endif
119
120$(LIB): ${OBJS}
121        $(make-library)
122
123ifndef RTEMS_SITE_INSTALLDIR
124RTEMS_SITE_INSTALLDIR = $(PROJECT_RELEASE)
125endif
126
127${RTEMS_SITE_INSTALLDIR}/include \
128${RTEMS_SITE_INSTALLDIR}/lib \
129${RTEMS_SITE_INSTALLDIR}/bin:
130        test -d $@ || mkdir -p $@
131# Install the program(s), appending _g or _p as appropriate.
132# for include files, just use $(INSTALL_CHANGE)
133#
134#  - Some BSPs might generate bootable executables in yet another
135#    format (such as .srec) and you might need to extend the rule
136#    below so the essential files get installed. YMMV.
137ifdef LIBNAME
138install:  all $(RTEMS_SITE_INSTALLDIR)/lib
139        $(INSTALL_VARIANT) -m 644 ${LIB} ${RTEMS_SITE_INSTALLDIR}/lib
140else
141install:  all $(RTEMS_SITE_INSTALLDIR)/bin
142        $(INSTALL_VARIANT) -m 555 ${PGMS} ${PGMS:%.exe=%.bin} ${PGMS:%.exe=%.sym} ${RTEMS_SITE_INSTALLDIR}/bin
143endif
Note: See TracBrowser for help on using the repository browser.