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.os4,v 1.6 2005/06/04 11:57:46 damato Exp $
21 #***************************************************************************/
25 STRIP = ppc-amigaos-strip
37 # Compiler/Linker flags
40 CDEFS = -D__TE_VERDATE=\"`date +%d.%m.%Y`\" -D__TE_VERDAYS="`expr \`date +%s\` / 86400 - 2922`"
42 OPTFLAGS = -O3 -finline-functions -fomit-frame-pointer -funroll-loops
43 DEBUG = -DDEBUG -g -O0
45 CFLAGS = -I. -I../mcc -I../includes $(CPU) $(CPUFLAGS) $(WARN) $(OPTFLAGS) $(DEBUG)\
46 -D__USE_INLINE__ $(REDEFINE) -c
47 LDFLAGS = -nostartfiles $(CPU)
50 # CPU and DEBUG can be defined outside, defaults to above
51 # using e.g. "make DEBUG= CPU=-mcpu=603e" produces optimized non-debug PPC-603e version
53 # OPTFLAGS are disabled by DEBUG normally!
55 # ignored warnings are:
56 # none - because we want to compile with -Wall all the time
59 MCPTARGET = $(BINDIR)/TextEditor.mcp
60 PREFTARGET= $(BINDIR)/TextEditor-Prefs
62 M68KSTUBS = $(OBJDIR)/mccclass_68k.o
64 MCPOBJS = $(OBJDIR)/library.o \
66 $(OBJDIR)/CreatePrefsGroup.o \
68 $(OBJDIR)/Dispatcher.o \
69 $(OBJDIR)/Keybindings.o \
70 $(OBJDIR)/KeyStorage.o \
71 $(OBJDIR)/ObjectCreator.o
73 PREFOBJS= $(OBJDIR)/locale.o \
74 $(OBJDIR)/CreatePrefsGroup.o \
76 $(OBJDIR)/Dispatcher.o \
77 $(OBJDIR)/Keybindings.o \
78 $(OBJDIR)/KeyStorage.o \
79 $(OBJDIR)/ObjectCreator.o \
80 $(OBJDIR)/Preference.o
84 all: $(BINDIR) $(OBJDIR) locale.c $(MCPTARGET) $(PREFTARGET)
86 # make the object directories
88 @printf '\033[33mGenerating $@ directory\033[0m\n'
91 # make the binary directories
93 @printf '\033[33mGenerating $@ directory\033[0m\n'
99 @printf '\033[32mCompiling $<\033[0m\n'
100 @$(CC) $(CFLAGS) $< -o $@ -DNO_PPCINLINE_STDARG
102 $(OBJDIR)/mccclass_68k.o: ../includes/mccclass_68k.c
103 @printf '\033[32mCompiling $<\033[0m\n'
104 @$(CC) $(CFLAGS) $< -o $@
106 $(LOCALE)/%.catalog: $(LOCALE)/%.ct
107 @printf '\033[33mGenerating $@\033[0m\n'
108 @$(FC) $(LOCALE)/TextEditor_mcp.cd $< CATALOG $@
112 $(MCPTARGET): $(M68KSTUBS) $(MCPOBJS)
113 @printf '\033[32mLinking \033[1m$@\033[0m\n'
114 @$(CC) $(LDFLAGS) -o $@.debug $(MCPOBJS) $(M68KSTUBS) $(LDLIBS)
115 @$(STRIP) -o $@ $@.debug
117 $(PREFTARGET): $(PREFOBJS) $(OBJDIR)/Preference.o
118 @printf '\033[32mLinking \033[1m$@\033[0m\n'
119 @$(CC) -o $@.debug $(PREFOBJS) $(LDLIBS)
120 @$(STRIP) -o $@ $@.debug
122 $(OBJDIR)/library.o: library.c ../includes/mccheader.c \
123 ../mcc/TextEditor_mcc.h private.h rev.h
125 $(OBJDIR)/library.o: library.c ../includes/mccheader.c TextEditor_mcp.h \
126 private.h icon.bh rev.h
129 locale.c: locale/TextEditor_mcp.cd C_h.sd C_c.sd
130 @printf '\033[33mGenerating locale file $@...\033[0m\n'
131 @$(FC) locale/TextEditor_mcp.cd locale.h=C_h.sd locale.c=C_c.sd
137 -$(RM) $(MCPTARGET) $(MCPTARGET).debug $(PREFTARGET) $(PREFTARGET).debug $(MCPOBJS) $(PREFOBJS) $(M68KSTUBS)