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
35 # Compiler/Linker flags
36 CPU = -m68020-60 -msoft-float
37 CDEFS = -D__BS_VERDATE=\"`date +%d.%m.%Y`\" -D__BS_VERDAYS="`expr \`date +%s\` / 86400 - 2922`"
39 OPTFLAGS = -O3 -fomit-frame-pointer -funroll-loops
40 DEBUG = -DWITH_DEBUG -g -O0
41 CFLAGS = -noixemul -I. -I../mcp -I../includes -c $(CPU) $(WARN) $(OPTFLAGS) $(DEBUG)
42 LDFLAGS = -noixemul -nostartfiles
43 LDLIBS = -lmui -ldebug
45 # CPU and DEBUG can be defined outside, defaults to above
46 # using e.g. "make DEBUG= CPU=-m68060" produces optimized non-debug 68060 version
48 # OPTFLAGS are disabled by DEBUG normally!
50 # ignored warnings are:
51 # none - because we want to compile with -Wall all the time
54 MCCTARGET = $(BINDIR)/BetterString.mcc
55 TESTTARGET= $(BINDIR)/BetterString-Test
57 M68KSTUBS = $(OBJDIR)/mccclass_68k.o
59 MCCOBJS = $(OBJDIR)/library.o \
60 $(OBJDIR)/AllocBitMap.o \
61 $(OBJDIR)/AllocFunctions.o \
62 $(OBJDIR)/Dispatcher.o \
63 $(OBJDIR)/FileNameCompl.o \
64 $(OBJDIR)/GetSetAttrs.o \
65 $(OBJDIR)/HandleInput.o \
66 $(OBJDIR)/InitConfig.o \
67 $(OBJDIR)/PrintString.o \
68 $(OBJDIR)/TextFunctions.o
71 TESTOBJS= $(OBJDIR)/BetterString-Test.o \
72 $(OBJDIR)/AllocBitMap.o \
73 $(OBJDIR)/AllocFunctions.o \
74 $(OBJDIR)/Dispatcher.o \
75 $(OBJDIR)/FileNameCompl.o \
76 $(OBJDIR)/GetSetAttrs.o \
77 $(OBJDIR)/HandleInput.o \
78 $(OBJDIR)/InitConfig.o \
79 $(OBJDIR)/PrintString.o \
80 $(OBJDIR)/TextFunctions.o
84 all: $(BINDIR) $(OBJDIR) $(MCCTARGET) $(TESTTARGET)
86 # make the object directories
88 @printf '\033[33mGenerating $@ directory\033[0m\n'
91 # make the binary directories
93 @printf '\033[33mGenerating $@ directory\033[0m\n'
99 @printf '\033[32mCompiling $<\033[0m\n'
100 @$(CC) $(CFLAGS) $< -o $@ -DNO_INLINE_STDARG
104 $(MCCTARGET): $(MCCOBJS)
105 @printf '\033[32mLinking \033[1m$@\033[0m\n'
106 @$(CC) $(LDFLAGS) -o $@.debug $(MCCOBJS) $(LDLIBS)
107 @$(CC) $(LDFLAGS) -s -o $@ $(MCCOBJS) $(LDLIBS)
109 $(TESTTARGET): $(TESTOBJS)
110 @printf '\033[32mLinking \033[1m$@\033[0m\n'
111 @$(CC) -o $@.debug $(TESTOBJS) $(LDLIBS)
112 @$(CC) -s -o $@ $(TESTOBJS) $(LDLIBS)
114 $(OBJDIR)/library.o: library.c ../includes/mccheader.c \
115 BetterString_mcc.h private.h rev.h
117 $(OBJDIR)/library.o: library.c ../includes/mccheader.c BetterString_mcc.h \
124 -$(RM) $(MCCTARGET) $(MCCTARGET).debug $(TESTTARGET) $(TESTTARGET).debug $(MCCOBJS) $(TESTOBJS) $(M68KSTUBS)