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.mos,v 1.1 2005/04/21 20:52:04 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 = -DWITH_DEBUG -g -O0
43 CFLAGS = -noixemul -I. -I../mcc -I../includes $(CPU) $(CPUFLAGS) $(WARN) $(OPTFLAGS)\
45 LDFLAGS = -noixemul -nostartfiles
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)/BetterString.mcp
58 PREFTARGET= $(BINDIR)/BetterString-Prefs
60 M68KSTUBS = $(OBJDIR)/mccclass_68k.o
62 MCPOBJS = $(OBJDIR)/library.o \
64 $(OBJDIR)/CreatePrefsGroup.o \
65 $(OBJDIR)/Dispatcher.o
67 PREFOBJS= $(OBJDIR)/locale.o \
68 $(OBJDIR)/CreatePrefsGroup.o \
69 $(OBJDIR)/Dispatcher.o \
70 $(OBJDIR)/Preference.o
74 all: $(BINDIR) $(OBJDIR) locale.c $(MCPTARGET) $(PREFTARGET)
76 # make the object directories
78 @printf '\033[33mGenerating $@ directory\033[0m\n'
81 # make the binary directories
83 @printf '\033[33mGenerating $@ directory\033[0m\n'
89 @printf '\033[32mCompiling $<\033[0m\n'
90 @$(CC) $(CFLAGS) $< -o $@ -DNO_PPCINLINE_STDARG
92 $(LOCALE)/%.catalog: $(LOCALE)/%.ct
93 @printf '\033[33mGenerating $@\033[0m\n'
94 @$(FC) $(LOCALE)/BetterString_mcp.cd $< CATALOG $@
98 $(MCPTARGET): $(MCPOBJS)
99 @printf '\033[32mLinking \033[1m$@\033[0m\n'
100 @$(CC) $(LDFLAGS) -o $@.debug $(MCPOBJS) $(LDLIBS)
101 @$(STRIP) -o $@ $@.debug
103 $(PREFTARGET): $(PREFOBJS) $(OBJDIR)/Preference.o
104 @printf '\033[32mLinking \033[1m$@\033[0m\n'
105 @$(CC) -noixemul -o $@.debug $(PREFOBJS) $(LDLIBS)
106 @$(STRIP) -o $@ $@.debug
108 $(OBJDIR)/library.o: library.c ../includes/mccheader.c \
109 ../mcc/BetterString_mcc.h private.h rev.h
111 $(OBJDIR)/library.o: library.c ../includes/mccheader.c BetterString_mcp.h \
112 private.h icon.bh rev.h
115 locale.c: locale/BetterString_mcp.cd C_h.sd C_c.sd
116 @printf '\033[33mGenerating locale file $@...\033[0m\n'
117 @$(FC) locale/BetterString_mcp.cd locale.h=C_h.sd locale.c=C_c.sd
123 -$(RM) $(MCPTARGET) $(MCPTARGET).debug $(PREFTARGET) $(PREFTARGET).debug $(MCPOBJS) $(PREFOBJS)