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
35 # Compiler/Linker flags
38 CDEFS = -D__BS_VERDATE=\"`date +%d.%m.%Y`\" -D__BS_VERDAYS="`expr \`date +%s\` / 86400 - 2922`"
40 OPTFLAGS = -O3 -finline-functions -fomit-frame-pointer -funroll-loops
41 DEBUG = -DWITH_DEBUG -g -O0
42 CFLAGS = -noixemul -I. -I../mcp -I../includes $(CPU) $(CPUFLAGS) $(WARN) $(OPTFLAGS)\
44 LDFLAGS = -noixemul -nostartfiles
47 # CPU and DEBUG can be defined outside, defaults to above
48 # using e.g. "make DEBUG= CPU=-mcpu=603e" produces optimized non-debug PPC-603e version
50 # OPTFLAGS are disabled by DEBUG normally!
52 # ignored warnings are:
53 # none - because we want to compile with -Wall all the time
56 MCCTARGET = $(BINDIR)/BetterString.mcc
57 TESTTARGET= $(BINDIR)/BetterString-Test
59 M68KSTUBS = $(OBJDIR)/mccclass_68k.o
61 MCCOBJS = $(OBJDIR)/library.o \
62 $(OBJDIR)/AllocBitMap.o \
63 $(OBJDIR)/AllocFunctions.o \
64 $(OBJDIR)/Dispatcher.o \
65 $(OBJDIR)/FileNameCompl.o \
66 $(OBJDIR)/GetSetAttrs.o \
67 $(OBJDIR)/HandleInput.o \
68 $(OBJDIR)/InitConfig.o \
69 $(OBJDIR)/PrintString.o \
70 $(OBJDIR)/TextFunctions.o
73 TESTOBJS= $(OBJDIR)/BetterString-Test.o \
74 $(OBJDIR)/AllocBitMap.o \
75 $(OBJDIR)/AllocFunctions.o \
76 $(OBJDIR)/Dispatcher.o \
77 $(OBJDIR)/FileNameCompl.o \
78 $(OBJDIR)/GetSetAttrs.o \
79 $(OBJDIR)/HandleInput.o \
80 $(OBJDIR)/InitConfig.o \
81 $(OBJDIR)/PrintString.o \
82 $(OBJDIR)/TextFunctions.o
86 all: $(BINDIR) $(OBJDIR) $(MCCTARGET) $(TESTTARGET)
88 # make the object directories
90 @printf '\033[33mGenerating $@ directory\033[0m\n'
93 # make the binary directories
95 @printf '\033[33mGenerating $@ directory\033[0m\n'
101 @printf '\033[32mCompiling $<\033[0m\n'
102 @$(CC) $(CFLAGS) $< -o $@ -DNO_PPCINLINE_STDARG
106 $(MCCTARGET): $(MCCOBJS)
107 @printf '\033[32mLinking \033[1m$@\033[0m\n'
108 @$(CC) $(LDFLAGS) -o $@.debug $(MCCOBJS) $(LDLIBS)
109 @$(STRIP) -o $@ $@.debug
111 $(TESTTARGET): $(TESTOBJS)
112 @printf '\033[32mLinking \033[1m$@\033[0m\n'
113 @$(CC) -noixemul -o $@.debug $(TESTOBJS) $(LDLIBS)
114 @$(STRIP) -o $@ $@.debug
116 $(OBJDIR)/library.o: library.c ../includes/mccheader.c \
117 BetterString_mcc.h private.h rev.h
119 $(OBJDIR)/library.o: library.c ../includes/mccheader.c BetterString_mcc.h \
126 -$(RM) $(MCCTARGET) $(MCCTARGET).debug $(TESTTARGET) $(TESTTARGET).debug $(MCCOBJS) $(TESTOBJS) $(M68KSTUBS)