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.os4,v 1.1 2005/04/21 20:52:04 damato Exp $
21 #***************************************************************************/
25 STRIP = ppc-amigaos-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
43 CFLAGS = -I. -I.. -I../../includes $(CPU) $(CPUFLAGS) $(WARN) $(OPTFLAGS) $(DEBUG)\
44 -D__USE_INLINE__ $(REDEFINE) -c
45 LDFLAGS = -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 MCCTARGET = $(BINDIR)/HotkeyString.mcc
58 TESTTARGET= $(BINDIR)/HotkeyString-Test
60 M68KSTUBS = $(OBJDIR)/mccclass_68k.o
62 MCCOBJS = $(OBJDIR)/library.o \
63 $(OBJDIR)/Dispatcher.o \
64 $(OBJDIR)/HandleInput.o
67 TESTOBJS= $(OBJDIR)/HotkeyString-Test.o \
68 $(OBJDIR)/Dispatcher.o \
69 $(OBJDIR)/HandleInput.o
73 all: $(BINDIR) $(OBJDIR) $(MCCTARGET) $(TESTTARGET)
75 # make the object directories
77 @printf '\033[33mGenerating $@ directory\033[0m\n'
80 # make the binary directories
82 @printf '\033[33mGenerating $@ directory\033[0m\n'
88 @printf '\033[32mCompiling $<\033[0m\n'
89 @$(CC) $(CFLAGS) $< -o $@ -DNO_PPCINLINE_STDARG
91 $(OBJDIR)/mccclass_68k.o: ../../includes/mccclass_68k.c
92 @printf '\033[32mCompiling $<\033[0m\n'
93 @$(CC) $(CFLAGS) $< -o $@
97 $(MCCTARGET): $(M68KSTUBS) $(MCCOBJS)
98 @printf '\033[32mLinking \033[1m$@\033[0m\n'
99 @$(CC) $(LDFLAGS) -o $@.debug $(MCCOBJS) $(M68KSTUBS) $(LDLIBS)
100 @$(STRIP) -o $@ $@.debug
102 $(TESTTARGET): $(TESTOBJS)
103 @printf '\033[32mLinking \033[1m$@\033[0m\n'
104 @$(CC) -o $@.debug $(TESTOBJS) $(LDLIBS)
105 @$(STRIP) -o $@ $@.debug
107 $(OBJDIR)/library.o: library.c ../../includes/mccheader.c \
108 HotkeyString_mcc.h private.h rev.h
110 $(OBJDIR)/library.o: library.c ../../includes/mccheader.c HotkeyString_mcc.h \
117 -$(RM) $(MCCTARGET) $(MCCTARGET).debug $(TESTTARGET) $(TESTTARGET).debug $(MCCOBJS) $(TESTOBJS) $(M68KSTUBS)