1 #/***************************************************************************
3 # BetterString.mcc - A better String gadget MUI Custom Class
4 # Copyright (C) 1997-2000 Allan Odgaard
5 # Copyright (C) 2005 by BetterString.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 # BetterString class Support Site: http://www.sf.net/projects/bstring-mcc/
19 # $Id: Makefile.os3,v 1.1 2005/04/21 20:52:04 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 = -DWITH_DEBUG -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)/BetterString.mcp
56 PREFTARGET= $(BINDIR)/BetterString-Prefs
58 M68KSTUBS = $(OBJDIR)/mccclass_68k.o
60 MCPOBJS = $(OBJDIR)/library.o \
62 $(OBJDIR)/CreatePrefsGroup.o \
63 $(OBJDIR)/Dispatcher.o
65 PREFOBJS= $(OBJDIR)/locale.o \
66 $(OBJDIR)/CreatePrefsGroup.o \
67 $(OBJDIR)/Dispatcher.o \
68 $(OBJDIR)/Preference.o
72 all: $(BINDIR) $(OBJDIR) locale.c $(MCPTARGET) $(PREFTARGET)
74 # make the object directories
76 @printf '\033[33mGenerating $@ directory\033[0m\n'
79 # make the binary directories
81 @printf '\033[33mGenerating $@ directory\033[0m\n'
87 @printf '\033[32mCompiling $<\033[0m\n'
88 @$(CC) $(CFLAGS) $< -o $@ -DNO_INLINE_STDARG
90 $(LOCALE)/%.catalog: $(LOCALE)/%.ct
91 @printf '\033[33mGenerating $@\033[0m\n'
92 @$(FC) $(LOCALE)/BetterString_mcp.cd $< CATALOG $@
96 $(MCPTARGET): $(MCPOBJS)
97 @printf '\033[32mLinking \033[1m$@\033[0m\n'
98 @$(CC) $(LDFLAGS) -o $@.debug $(MCPOBJS) $(LDLIBS)
99 @$(CC) $(LDFLAGS) -s -o $@ $(MCPOBJS) $(LDLIBS)
101 $(PREFTARGET): $(PREFOBJS) $(OBJDIR)/Preference.o
102 @printf '\033[32mLinking \033[1m$@\033[0m\n'
103 @$(CC) -o $@.debug $(PREFOBJS) $(LDLIBS)
104 @$(CC) -s -o $@ $(PREFOBJS) $(LDLIBS)
106 $(OBJDIR)/library.o: library.c ../includes/mccheader.c \
107 ../mcc/BetterString_mcc.h private.h rev.h
109 $(OBJDIR)/library.o: library.c ../includes/mccheader.c BetterString_mcp.h \
110 private.h icon.bh rev.h
113 locale.c: locale/BetterString_mcp.cd C_h.sd C_c.sd
114 @printf '\033[33mGenerating locale file $@...\033[0m\n'
115 @$(FC) locale/BetterString_mcp.cd locale.h=C_h.sd locale.c=C_c.sd
121 -$(RM) $(MCPTARGET) $(MCPTARGET).debug $(PREFTARGET) $(PREFTARGET).debug $(MCPOBJS) $(PREFOBJS)