fix remapping behavior. Remapping is only necessary if we are rendering on the workbe...
[AROS-Contrib.git] / scalos / main / makefile-new
blob89d837917c5072bfa10a60d5eedda19f0dd4e1bd
1 # $Date: 2011-07-02 20:26:48 +0200 (Sa, 02. Jul 2011) $
2 # $Revision: 752 $
3 ##############################################################################
5 ifndef TOPLEVEL
6         TOPLEVEL=$(shell pwd)/..
7 endif
9 # Native FlexCat doesn't like Linux paths
10 ifeq ($(CROSS), )
11         SDPATH=
12 else
13         SDPATH=..
14 endif
16 ###############################################################################
18 include         config.mk
20 ##############################################################################
22 # Project Object files
25 OBJS    =       $(OBJDIR)/about.o                       \
26                 $(OBJDIR)/AppMenu.o                     \
27                 $(OBJDIR)/AutoUpdate.o                  \
28                 $(OBJDIR)/Backdrop.o                    \
29                 $(OBJDIR)/BackFill.o                    \
30                 $(OBJDIR)/BTree.o                       \
31                 $(OBJDIR)/ButtonGadgetClass.o           \
32                 $(OBJDIR)/ChildProcess.o                \
33                 $(OBJDIR)/Class.o                       \
34                 $(OBJDIR)/cleanup.o                     \
35                 $(OBJDIR)/CLIStart.o                    \
36                 $(OBJDIR)/ControlBar.o                  \
37                 $(OBJDIR)/crc32.o                       \
38                 $(OBJDIR)/CycleGadgetClass.o            \
39                 $(OBJDIR)/DefIcons.o                    \
40                 $(OBJDIR)/DeviceWindowClass.o           \
41                 $(OBJDIR)/DevListClass.o                \
42                 $(OBJDIR)/Dos64.o                       \
43                 $(OBJDIR)/DoubleClick.o                 \
44                 $(OBJDIR)/DragDrop.o                    \
45                 $(OBJDIR)/DragDropBobs.o                \
46                 $(OBJDIR)/DrawIcon.o                    \
47                 $(OBJDIR)/DropMarks.o                   \
48                 $(OBJDIR)/dtimage.o                     \
49                 $(OBJDIR)/DtImageClass.o                \
50                 $(OBJDIR)/FileCommands.o                \
51                 $(OBJDIR)/FileTransClass.o              \
52                 $(OBJDIR)/filetypes.o                   \
53                 $(OBJDIR)/FontUtil.o                    \
54                 $(OBJDIR)/FrameImageClass.o             \
55                 $(OBJDIR)/FsAbstraction.o               \
56                 $(OBJDIR)/Functions.o                   \
57                 $(OBJDIR)/GadgetBarClass.o              \
58                 $(OBJDIR)/GadgetBarImageClass.o         \
59                 $(OBJDIR)/GadgetBarTextClass.o          \
60                 $(OBJDIR)/GaugeGadgetClass.o            \
61                 $(OBJDIR)/HistoryGadgetClass.o          \
62                 $(OBJDIR)/IconifyClass.o                \
63                 $(OBJDIR)/IconImageClass.o              \
64                 $(OBJDIR)/IconWindowClass.o             \
65                 $(OBJDIR)/IconWindow_MouseMove.o        \
66                 $(OBJDIR)/idcmp.o                       \
67                 $(OBJDIR)/InputHandler.o                \
68                 $(OBJDIR)/int64.o                       \
69                 $(OBJDIR)/Lasso.o                       \
70                 $(OBJDIR)/LocaleStrings.o               \
71                 $(OBJDIR)/MainWait.o                    \
72                 $(OBJDIR)/Memory.o                      \
73                 $(OBJDIR)/Menu.o                        \
74                 $(OBJDIR)/MenuCommand.o                 \
75                 $(OBJDIR)/Messages.o                    \
76                 $(OBJDIR)/MouseIcon.o                   \
77                 $(OBJDIR)/OpenDrawerByName.o            \
78                 $(OBJDIR)/Patches.o                     \
79                 $(OBJDIR)/Pattern.o                     \
80                 $(OBJDIR)/PopOpenWindows.o              \
81                 $(OBJDIR)/PopupMenus.o                  \
82                 $(OBJDIR)/Prefs.o                       \
83                 $(OBJDIR)/Rename.o                      \
84                 $(OBJDIR)/Request.o                     \
85                 $(OBJDIR)/RootClass.o                   \
86                 $(OBJDIR)/ScaLibrary.o                  \
87                 $(OBJDIR)/Scalos.o                      \
88                 $(OBJDIR)/ScalosInit.o                  \
89                 $(OBJDIR)/ScalosMcpGfx.o                \
90                 $(OBJDIR)/ScalosLocale.o                \
91                 $(OBJDIR)/ScalosVersion.o               \
92                 $(OBJDIR)/Scalos_Cx.o                   \
93                 $(OBJDIR)/ScanDir.o                     \
94                 $(OBJDIR)/ScanDirText.o                 \
95                 $(OBJDIR)/Semaphores.o                  \
96                 $(OBJDIR)/SeparatorGadgetClass.o        \
97                 $(OBJDIR)/Shortcuts.o                   \
98                 $(OBJDIR)/Splash.o                      \
99                 $(OBJDIR)/StatusBar.o                   \
100                 $(OBJDIR)/StringGadgetClass.o           \
101                 $(OBJDIR)/Subroutines.o                 \
102                 $(OBJDIR)/TextIconClass.o               \
103                 $(OBJDIR)/TextIconHighlightClass.o      \
104                 $(OBJDIR)/TextWindowClass.o             \
105                 $(OBJDIR)/TitleClass.o                  \
106                 $(OBJDIR)/ThumbnailCache.o              \
107                 $(OBJDIR)/Thumbnails.o                  \
108                 $(OBJDIR)/ToolTip.o                     \
109                 $(OBJDIR)/ToolTypes.o                   \
110                 $(OBJDIR)/TTLayout.o                    \
111                 $(OBJDIR)/Undo.o                        \
112                 $(OBJDIR)/wbl.o                         \
113                 $(OBJDIR)/WBStartup.o                   \
114                 $(OBJDIR)/Window.o                      \
115                 $(OBJDIR)/WindowClass.o                 \
116                 $(OBJDIR)/windowtask.o                  \
118 ifeq ($(MACHINE), ppc-amigaos)
119         OBJS += $(OBJDIR)/Patches-aos4.o                \
120                 $(OBJDIR)/malloc.o                      \
121                 $(OBJDIR)/ScaLibrary-aos4.o             \
122                 $(OBJDIR)/scalos-aos4-68kstubs.o
123 else
124 ifeq ($(MACHINE), i386-aros)
125         OBJS += $(OBJDIR)/Patches-aros.o                \
126                 $(OBJDIR)/ScaLibrary-aros.o
127 else
128         OBJS += $(OBJDIR)/Patches-classic.o             \
129                 $(OBJDIR)/malloc.o                      \
130                 $(OBJDIR)/ScaLibrary-classic.o
131 endif
132 endif
134 ##############################################################################
136 # Autodependencies
138 ifneq ($(MAKECMDGOALS),clean)
139         -include $(OBJS:.o=.d)
140 endif
142 ##############################################################################
144 # Some lame deps
147 $(OBJDIR)/%.o: $(MCPGFX_DIR)/%.c
148         @$(run-cc)
150 about.c Scalos.c windowtask.c locale.h : $(OBJDIR)/Scalos_Locale.h
151 filetypes.c : MsgIdNames.h
153 $(OBJDIR)/Scalos_Locale.h : Scalos.cd $(TOPLEVEL)/CatComp_h.sd
154         @printf 'Compile $@ from $<\n'
155         @$(FLEXCAT) $< $@=$(SDPATH)/CatComp_h.sd
157 MsgIdNames.h : Scalos.cd $(TOPLEVEL)/msgidnames.sd
158         @printf 'Generate $@\n'
159         @$(FLEXCAT) $< $@=$(SDPATH)/msgidnames.sd
161 $(OBJDIR)/ScalosVersion.o : FORCE
163 FORCE:
165 ##############################################################################
167 # Target
170 NAME    =       Scalos
171 NAME_DB =       Scalos.debug
173 ##############################################################################
175 # Subdirs
178 SUBDIRS =       Tools                           \
179                 $(filter-out catalogs/sample/Scalos, $(wildcard catalogs/*/Scalos)) \
180 #               std_includes/sfd                \
182 ##############################################################################
184 .PHONY: all install clean bump dump nodebug
186 all:    $(BINDIR)/$(NAME) \
187         $(BINDIR)/$(NAME_DB) \
188         all_subdirs \
190 ##############################################################################
192 $(BINDIR)/$(NAME) $(BINDIR)/$(NAME_DB) : $(OBJS)
193         @$(ECHO) "Link $(NAME)"
194         @$(CC) $(STARTUP) $(OBJS) $(LFLAGS) $(DEFINES) -o $(BINDIR)/$(NAME_DB)
195         @$(STRIP) $(SFLAGS) $(BINDIR)/$(NAME_DB) -o $(BINDIR)/$(NAME)
196         @chmod u+x $@
198 ##############################################################################
200 nodebug: nodebug_subdirs
202 install: install_subdirs
204 install:
205         -@$(ECHO) "Installing $(NAME)"
206         @copy $(BINDIR)/$(NAME) Scalos: clone
208 clean:  clean_subdirs
210 clean:
211         @$(RM) -frv $(OBJDIR)/*.o $(OBJDIR)/*.d  $(OBJDIR)/*.d.* \
212                 $(OBJDIR)/*.i \
213                 $(OBJDIR)/*.s $(OBJDIR)/*.d.* \
214                 $(BINDIR)/$(NAME) $(BINDIR)/$(NAME_DB) \
215                 *.dump *_str.* \
216                 $(OBJDIR)/Scalos_Locale.h MsgIdNames.h
218 ##############################################################################