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.os3,v 1.5 2005/06/04 11:57:46 damato Exp $
21 #***************************************************************************/
25 STRIP = m68k-amigaos-strip
36 # Compiler/Linker flags
37 CPU = -m68020-60 -msoft-float
38 CDEFS = -D__NLV_VERDATE=\"`date +%d.%m.%Y`\" -D__NLV_VERDAYS="`expr \`date +%s\` / 86400 - 2922`"
40 OPTFLAGS = -O3 -fomit-frame-pointer -funroll-loops
41 DEBUG = -DDEBUG -g -O0
42 CFLAGS = -noixemul -I. -I../mcc -I../includes -c $(CPU) $(WARN) $(OPTFLAGS) $(DEBUG)
43 LDFLAGS = -noixemul -nostartfiles $(CPU)
44 LDLIBS = -lmui -ldebug -lamiga
46 # CPU and DEBUG can be defined outside, defaults to above
47 # using e.g. "make DEBUG= CPU=-m68060" produces optimized non-debug 68060 version
49 # OPTFLAGS are disabled by DEBUG normally!
51 # ignored warnings are:
52 # none - because we want to compile with -Wall all the time
55 MCPTARGET = $(BINDIR)/TextEditor.mcp
56 PREFTARGET= $(BINDIR)/TextEditor-Prefs
58 MCPOBJS = $(OBJDIR)/library.o \
60 $(OBJDIR)/CreatePrefsGroup.o \
62 $(OBJDIR)/Dispatcher.o \
63 $(OBJDIR)/Keybindings.o \
64 $(OBJDIR)/KeyStorage.o \
65 $(OBJDIR)/ObjectCreator.o
67 PREFOBJS =$(OBJDIR)/locale.o \
68 $(OBJDIR)/CreatePrefsGroup.o \
70 $(OBJDIR)/Dispatcher.o \
71 $(OBJDIR)/Keybindings.o \
72 $(OBJDIR)/KeyStorage.o \
73 $(OBJDIR)/ObjectCreator.o \
74 $(OBJDIR)/Preference.o
78 all: $(BINDIR) $(OBJDIR) locale.c $(MCPTARGET) $(PREFTARGET)
80 # make the object directories
82 @printf '\033[33mGenerating $@ directory\033[0m\n'
85 # make the binary directories
87 @printf '\033[33mGenerating $@ directory\033[0m\n'
93 @printf '\033[32mCompiling $<\033[0m\n'
94 @$(CC) $(CFLAGS) $< -o $@ -DNO_INLINE_STDARG
96 $(LOCALE)/%.catalog: $(LOCALE)/%.ct
97 @printf '\033[33mGenerating $@\033[0m\n'
98 @$(FC) $(LOCALE)/TextEditor_mcp.cd $< CATALOG $@
102 $(MCPTARGET): $(MCPOBJS)
103 @printf '\033[32mLinking \033[1m$@\033[0m\n'
104 @$(CC) $(LDFLAGS) -o $@.debug $(MCPOBJS) $(LDLIBS)
105 @$(CC) $(LDFLAGS) -s -o $@ $(MCPOBJS) $(LDLIBS)
107 $(PREFTARGET): $(PREFOBJS) $(OBJDIR)/Preference.o
108 @printf '\033[32mLinking \033[1m$@\033[0m\n'
109 @$(CC) -o $@.debug $(PREFOBJS) $(LDLIBS)
110 @$(CC) -s -o $@ $(PREFOBJS) $(LDLIBS)
112 $(OBJDIR)/library.o: library.c ../includes/mccheader.c \
113 ../mcc/TextEditor_mcc.h private.h rev.h
115 $(OBJDIR)/library.o: library.c ../includes/mccheader.c TextEditor_mcp.h \
116 private.h icon.bh rev.h
119 locale.c: locale/TextEditor_mcp.cd C_h.sd C_c.sd
120 @printf '\033[33mGenerating locale file $@...\033[0m\n'
121 @$(FC) locale/TextEditor_mcp.cd locale.h=C_h.sd locale.c=C_c.sd
127 -$(RM) $(MCPTARGET) $(MCPTARGET).debug $(PREFTARGET) $(PREFTARGET).debug $(MCPOBJS) $(PREFOBJS)