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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [mw/] [src/] [demos/] [nanox/] [Makefile] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 673 markom
##############################################################################
2
# Microwindows template Makefile
3
# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
4
##############################################################################
5
 
6
ifndef TOP
7
TOP = ../..
8
CONFIG = $(TOP)/config
9
endif
10
 
11
include $(CONFIG)
12
 
13
######################## Additional Flags section ############################
14
 
15
# Directories list for header files
16
INCLUDEDIRS +=
17
# Defines for preprocessor
18
DEFINES +=
19
 
20
# Compilation flags for C files OTHER than include directories
21
CFLAGS +=
22
# Preprocessor flags OTHER than defines
23
CPPFLAGS +=
24
# Linking flags
25
LDFLAGS += -lm
26
 
27
############################# targets section ################################
28
 
29
ifeq ($(NANOX), Y)
30
ifeq ($(NANOXDEMO), Y)
31
 
32
# If you want to create a library with the objects files, define the name here
33
LIBNAME =
34
 
35
# List of objects to compile
36
ifeq ($(ARCH), ECOS)
37
OBJS = landmine.o
38
TARGETS = $(TOP)/bin/landmine.o
39
OBJS += ntetris.o
40
TARGETS += $(TOP)/bin/ntetris.o
41
OBJS += world.o
42
TARGETS += $(TOP)/bin/world.o
43
else
44
OBJS =  demo.o \
45
        move.o \
46
        landmine.o \
47
        world.o \
48
        nxclock.o \
49
        nxterm.o \
50
        nxview.o \
51
        nxlsclients.o \
52
        nxev.o \
53
        npanel.o \
54
        nterm.o \
55
        demo2.o \
56
        demo5.o \
57
        demo6.o \
58
        t1demo.o \
59
        ftdemo.o \
60
        logfont.o \
61
        slider.o \
62
        ntetris.o \
63
        launcher.o \
64
        nsaver.o \
65
        getselection.o \
66 770 simons
        setselection.o \
67
        maze.o mazenx.o erase.o
68 673 markom
 
69
TARGETS = $(TOP)/bin/demo $(TOP)/bin/move $(TOP)/bin/landmine \
70
        $(TOP)/bin/world $(TOP)/bin/nxclock $(TOP)/bin/nxterm \
71
        $(TOP)/bin/nxview $(TOP)/bin/nxlsclients $(TOP)/bin/nxev \
72
        $(TOP)/bin/npanel $(TOP)/bin/nterm \
73
        $(TOP)/bin/demo2 $(TOP)/bin/demo5 $(TOP)/bin/demo6 \
74
        $(TOP)/bin/t1demo $(TOP)/bin/ftdemo $(TOP)/bin/logfont \
75
        $(TOP)/bin/slider $(TOP)/bin/ntetris $(TOP)/bin/launcher \
76 770 simons
        $(TOP)/bin/nsaver $(TOP)/bin/getselection $(TOP)/bin/setselection \
77
        $(TOP)/bin/maze
78 673 markom
endif
79
 
80
all: default $(TARGETS)
81
        $(CP) world.map nanogui.ppm ntetris.ppm launcher.cnf tux.gif $(TOP)/bin
82
 
83
endif
84
endif
85
 
86
######################### Makefile.rules section #############################
87
 
88
include $(TOP)/Makefile.rules
89
 
90
ifeq ($(SHAREDLIBS), Y)
91
LD_NANOXCLIENTLIBS = $(CCNANOXCLIENTLIBS)
92
else
93
LD_NANOXCLIENTLIBS = $(NANOXCLIENTLIBS)
94
endif
95
 
96
######################## Tools targets section ###############################
97
 
98
$(TOP)/bin/demo: demo.o $(NANOXCLIENTLIBS) $(TOP)/config
99
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
100
 
101
$(TOP)/bin/move: move.o $(NANOXCLIENTLIBS) $(TOP)/config
102
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
103
 
104
$(TOP)/bin/landmine: landmine.o $(NANOXCLIENTLIBS) $(TOP)/config
105
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
106
 
107
$(TOP)/bin/world: world.o $(NANOXCLIENTLIBS) $(TOP)/config
108
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
109
 
110
$(TOP)/bin/nxclock: nxclock.o $(NANOXCLIENTLIBS) $(TOP)/config
111
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
112
 
113
$(TOP)/bin/nxterm: nxterm.o $(NANOXCLIENTLIBS) $(TOP)/config
114
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
115
 
116
$(TOP)/bin/nxview: nxview.o $(NANOXCLIENTLIBS) $(TOP)/config
117
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
118
 
119
$(TOP)/bin/nxlsclients: nxlsclients.o $(NANOXCLIENTLIBS) $(TOP)/config
120
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
121
 
122
$(TOP)/bin/nxev: nxev.o $(NANOXCLIENTLIBS) $(TOP)/config
123
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
124
 
125
$(TOP)/bin/npanel: npanel.o $(NANOXCLIENTLIBS) $(TOP)/config
126
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
127
 
128
$(TOP)/bin/nterm: nterm.o $(NANOXCLIENTLIBS) $(TOP)/config
129
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
130
 
131
$(TOP)/bin/demo2: demo2.o $(NANOXCLIENTLIBS) $(TOP)/config
132
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
133
 
134
$(TOP)/bin/demo5: demo5.o $(NANOXCLIENTLIBS) $(TOP)/config
135
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
136
 
137
$(TOP)/bin/demo6: demo6.o $(NANOXCLIENTLIBS) $(TOP)/config
138
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
139
 
140
$(TOP)/bin/t1demo: t1demo.o $(NANOXCLIENTLIBS) $(TOP)/config
141
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
142
 
143
$(TOP)/bin/ftdemo: ftdemo.o $(NANOXCLIENTLIBS) $(TOP)/config
144
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
145
 
146
$(TOP)/bin/logfont: logfont.o $(NANOXCLIENTLIBS) $(TOP)/config
147
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
148
 
149
$(TOP)/bin/slider: slider.o $(NANOXCLIENTLIBS) $(TOP)/config
150
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
151
 
152
$(TOP)/bin/ntetris: ntetris.o $(NANOXCLIENTLIBS) $(TOP)/config
153
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
154
 
155
$(TOP)/bin/launcher: launcher.o $($NANOXCLIENTLIBS) $(TOP)/config
156
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
157
 
158
$(TOP)/bin/nsaver: nsaver.o $($NANOXCLIENTLIBS) $(TOP)/config
159 770 simons
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) -lm
160 673 markom
 
161
$(TOP)/bin/getselection: getselection.o $($NANOXCLIENTLIBS) $(TOP)/config
162
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
163
 
164
$(TOP)/bin/setselection: setselection.o $($NANOXCLIENTLIBS) $(TOP)/config
165
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS)
166
 
167 770 simons
$(TOP)/bin/maze: maze.o mazenx.o erase.o $($NANOXCLIENTLIBS) $(TOP)/config
168
        $(CC) $(CFLAGS) $(LDFLAGS) maze.o mazenx.o erase.o -o $@ $(LD_NANOXCLIENTLIBS) -lm
169
 
170 673 markom
ifeq ($(ARCH), ECOS)
171
# Special build rules for linked in applications
172
$(TOP)/bin/landmine.o: landmine.o
173
#       $(CC) $(CFLAGS) $(LDFLAGS) $< -Wl,-r -Wl,--retain-symbols-file -Wl,landmine.syms -Wl,--defsym -Wl,landmine_main=main -o XX.o
174
        $(CC) $(CFLAGS) $(LDFLAGS) $< -Wl,-r -Wl,--defsym -Wl,landmine_main=main -o XX.o
175
        $(NM) XX.o | grep -v _main | grep ' T' | awk -f $(TOP)/ecos/retain.awk | xargs $(OBJCOPY) XX.o $@
176
        rm -f XX.o
177
 
178
$(TOP)/bin/ntetris.o: ntetris.o
179
        $(CC) $(CFLAGS) $(LDFLAGS) $< -Wl,-r -Wl,--defsym -Wl,ntetris_main=main -o XX.o
180
        $(NM) XX.o | grep -v _main | grep ' T' | awk -f $(TOP)/ecos/retain.awk | xargs $(OBJCOPY) XX.o $@
181
        rm -f XX.o
182
 
183
$(TOP)/bin/world.o: world.o
184
        $(CC) $(CFLAGS) $(LDFLAGS) $< -Wl,-r -Wl,--defsym -Wl,world_main=main -o XX.o
185
        $(NM) XX.o | grep -v _main | grep ' T' | awk -f $(TOP)/ecos/retain.awk | xargs $(OBJCOPY) XX.o $@
186
        rm -f XX.o
187
endif
188
 

powered by: WebSVN 2.1.0

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