1 #/***************************************************************************
3 # TextEditor.mcc - Textediting MUI Custom Class
4 # Copyright (C) 1997-2000 Allan Odgaard
5 # Copyright (C) 2005 by TextEditor.mcc Open Source Team
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # TextEditor class Support Site: http://www.sf.net/projects/texteditor-mcc
19 # $Id: Makefile.mos,v 1.5 2005/06/04 11:57:46 damato Exp $
21 #***************************************************************************/
25 STRIP = ppc-morphos-strip
36 # Compiler/Linker flags
39 CDEFS = -D__NLVP_VERDATE=\"`date +%d.%m.%Y`\" -D__NLVP_VERDAYS="`expr \`date +%s\` / 86400 - 2922`"
41 OPTFLAGS = -O3 -finline-functions -fomit-frame-pointer -funroll-loops
42 DEBUG = -DDEBUG -g -O0
43 CFLAGS = -noixemul -I. -I../mcc -I../includes $(CPU) $(CPUFLAGS) $(WARN) $(OPTFLAGS)\
45 LDFLAGS = -noixemul -nostartfiles $(CPU)
48 # CPU and DEBUG can be defined outside, defaults to above
49 # using e.g. "make DEBUG= CPU=-mcpu=603e" produces optimized non-debug PPC-603e version
51 # OPTFLAGS are disabled by DEBUG normally!
53 # ignored warnings are:
54 # none - because we want to compile with -Wall all the time
57 MCPTARGET = $(BINDIR)/TextEditor.mcp
58 PREFTARGET= $(BINDIR)/TextEditor-Prefs
60 MCPOBJS = $(OBJDIR)/library.o \
62 $(OBJDIR)/CreatePrefsGroup.o \
64 $(OBJDIR)/Dispatcher.o \
65 $(OBJDIR)/Keybindings.o \
66 $(OBJDIR)/KeyStorage.o \
67 $(OBJDIR)/ObjectCreator.o
69 PREFOBJS =$(OBJDIR)/locale.o \
70 $(OBJDIR)/CreatePrefsGroup.o \
72 $(OBJDIR)/Dispatcher.o \
73 $(OBJDIR)/Keybindings.o \
74 $(OBJDIR)/KeyStorage.o \
75 $(OBJDIR)/ObjectCreator.o \
76 $(OBJDIR)/Preference.o
80 all: $(BINDIR) $(OBJDIR) locale.c $(MCPTARGET) $(PREFTARGET)
82 # make the object directories
84 @printf '\033[33mGenerating $@ directory\033[0m\n'
87 # make the binary directories
89 @printf '\033[33mGenerating $@ directory\033[0m\n'
95 @printf '\033[32mCompiling $<\033[0m\n'
96 @$(CC) $(CFLAGS) $< -o $@ -DNO_PPCINLINE_STDARG
98 $(LOCALE)/%.catalog: $(LOCALE)/%.ct
99 @printf '\033[33mGenerating $@\033[0m\n'
100 @$(FC) $(LOCALE)/TextEditor_mcp.cd $< CATALOG $@
104 $(MCPTARGET): $(MCPOBJS)
105 @printf '\033[32mLinking \033[1m$@\033[0m\n'
106 @$(CC) $(LDFLAGS) -o $@.debug $(MCPOBJS) $(LDLIBS)
107 @$(STRIP) -o $@ $@.debug
109 $(PREFTARGET): $(PREFOBJS) $(OBJDIR)/Preference.o
110 @printf '\033[32mLinking \033[1m$@\033[0m\n'
111 @$(CC) -noixemul -o $@.debug $(PREFOBJS) $(LDLIBS)
112 @$(STRIP) -o $@ $@.debug
114 $(OBJDIR)/library.o: library.c ../includes/mccheader.c \
115 ../mcc/TextEditor_mcc.h private.h rev.h
117 $(OBJDIR)/library.o: library.c ../includes/mccheader.c TextEditor_mcp.h \
118 private.h icon.bh rev.h
121 locale.c: locale/TextEditor_mcp.cd C_h.sd C_c.sd
122 @printf '\033[33mGenerating locale file $@...\033[0m\n'
123 @$(FC) locale/TextEditor_mcp.cd locale.h=C_h.sd locale.c=C_c.sd
129 -$(RM) $(MCPTARGET) $(MCPTARGET).debug $(PREFTARGET) $(PREFTARGET).debug $(MCPOBJS) $(PREFOBJS)