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

Subversion Repositories or1k

[/] [or1k/] [tags/] [MW_0_8_9PRE7/] [mw/] [src/] [rtems/] [Makefile.rtems] - Blame information for rev 674

Go to most recent revision | 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
# Rosimildo da Silva
6
# Udapted to the RTEMS environment...
7
#
8
##############################################################################
9
 
10
ifndef TOP
11
TOP = ..
12
CONFIG = $(TOP)/config
13
endif
14
 
15
include $(CONFIG)
16
 
17
######################## Additional Flags section ############################
18
 
19
# Directories list for header files
20
ifeq ($(HAVE_JPEG_SUPPORT), Y)
21
INCLUDEDIRS += -I$(TOP)/jpeg-6b
22
endif
23
# Defines for preprocessor
24
DEFINES +=
25
# Defines for preprocessor
26
ifeq ($(LINK_APP_INTO_SERVER), Y)
27
DEFINES += -DNONETWORK=1
28
endif
29
 
30
# Compilation flags for C files OTHER than include directories
31
CFLAGS +=
32
# Preprocessor flags OTHER than defines
33
CPPFLAGS +=
34
# Linking flags
35
ifeq ($(HAVE_JPEG_SUPPORT), Y)
36
LDFLAGS += -L$(TOP)/jpeg-6b
37
endif
38
 
39
# PC386 specific stuff...
40
PROJECT_RELEASE     = $(RTEMS_BUILD)/$(RTEMS_BSP)
41
PROJECT_TOOLS       = $(PROJECT_RELEASE)/build-tools
42
START16FILE         = $(PROJECT_RELEASE)/lib/start16.bin
43
RELOCADDR           = 0x00100000
44
START16ADDR         = 0x00097C00
45
HEADERADDR          = 0x00097E00
46
EXTRA_LFLAGS        =-Wl,-Ttext,$(RELOCADDR)
47
 
48
############################# targets section ################################
49
 
50
ifeq ($(ARCH), RTEMS)
51
 
52
# If you want to create a library with the objects files, define the name here
53
LIBNAME =
54
 
55
 
56
# Name of the target which the image will be created to the downloaded to the
57
# target box.
58
RTEMS_TARGET=rtems
59
 
60
 
61
# Main module -- this module defines the "main()" routine to get compiled.
62
# It basically selects which application is actually built to be loaded as
63
# the RTEMS system.
64
# For example, select one:
65
# MAIN_OBJ = mw_uid_test.o                  -- Mouse & KBD test driver
66
# MAIN_OBJ = ../demos/nanox/demo.o          -- Nano-X demo
67
# MAIN_OBJ = ../demos/mwobjects/mwo-test.o  -- C++ demo
68
# MAIN_OBJ = ../demos/test/test.o           -- test driver
69
 
70
 
71
# If you want to build the "mineswipper" game, use the modules below.
72
# This should give you an idea of what you have to do to the others demos.
73
#MINEIMAGES = ../demos/mwin/mineflag.o ../demos/mwin/mineface.o \
74
#             ../demos/mwin/minefacelost.o ../demos/mwin/minebomb.o \
75
#             ../demos/mwin/minedone.o ../demos/mwin/minehitfalse.o
76
#MAIN_OBJ =../demos/mwin/mine.o $(MINEIMAGES)
77
 
78
MAIN_OBJ = ../demos/mwin/demo.o
79
 
80
# List of objects always needed by a RTEMS application
81
OBJS =  rtems_init.o
82
 
83
# IMPORTANT NOTE: if MAIN_OBJ is a C++ code, add it to CXXOBJS instead.
84
OBJS += $(MAIN_OBJ)
85
# CXXOBJS += $(MAIN_OBJ)
86
 
87
 
88
all: default $(RTEMS_TARGET).bt
89
 
90
 
91
######################### Makefile.rules section #############################
92
 
93
include $(TOP)/Makefile.rules
94
 
95
######################## Tools targets section ###############################
96
# let's adjust the libraries to match the API that you are using.
97
 
98
NLIBS =
99
 
100
ifeq ($(NANOX), Y)
101
NLIBS += -lnano-X
102
endif
103
 
104
ifeq ($(NWIDGET), Y)
105
NLIBS += -lnwidget
106
endif
107
 
108
ifeq ($(OBJFRAMEWORK), Y)
109
NLIBS += -lmwobjects
110
endif
111
 
112
ifeq ($(MICROWIN), Y)
113
NLIBS += -lmwin -lmwinlib
114
endif
115
 
116
NLIBS += -lmwengine -lmwdrivers -lmwfonts -lmwimages -lm
117
 
118
ifeq ($(VGALIB), Y)
119
NLIBS += -lvga
120
endif
121
 
122
$(RTEMS_TARGET).bt: $(RTEMS_TARGET).exe
123
        $(OBJCOPY) -O binary $(RTEMS_TARGET).exe $(RTEMS_TARGET).bin;
124
        $(PROJECT_TOOLS)/bin2boot -v $(RTEMS_TARGET).bt $(HEADERADDR) $(START16FILE) \
125
        $(START16ADDR) 0 $(RTEMS_TARGET).bin $(RELOCADDR) 0;
126
        rm $(RTEMS_TARGET).bin
127
 
128
$(RTEMS_TARGET).exe: $(OBJS) $(CXXOBJS)
129
        $(CXX) $(CFLAGS) $(LDFLAGS) $(EXTRA_LFLAGS) $^ -o $@ $(NLIBS)
130
 
131
 
132
endif

powered by: WebSVN 2.1.0

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