be a bit more descriptive about failures. don't try to blindly continue if we fail...
[AROS.git] / tools / dtdesc / Makefile.aros
blob2dd196e47079721979db6b3faf102463c19ca79d
1 #   Copyright © 1995-2001, The AROS Development Team. All rights reserved.
2 #   $Id$
4 #   Makefile for dtdesc
6 SRC := createdtdesc.c examinedtdesc.c
8 -include $(TOP)/config/make.cfg
10 # These are the compatibility variables. They will only be defined
11 # if including $(TOP)/config/make.cfg fails (since they will then
12 # be undefined.
14 HOST_CC     ?= $(CC)
15 HOST_CFLAGS ?= -Wall -g -O
16 TOOLDIR     ?= .
17 ifneq ($(HOSTGENDIR),)
18 OBJDIR := $(HOSTGENDIR)/$(subst $(SRCDIR)/,,$(CURDIR))
19 CIFFSRCDIR := $(SRCDIR)/tools/dtdesc/c_iff
20 CIFFLIBDIR := $(TOOLDIR)
21 else
22 OBJDIR := $(TOOLDIR)/obj
23 CIFFSRCDIR := $(TOOLDIR)/c_iff
24 CIFFLIBDIR := $(TOOLDIR)/c_iff
25 endif
26 MKDIR       ?= mkdir
28 INCL        := -I. -I $(CIFFSRCDIR)
30 RM          ?= rm -f
31 AR          ?= ar rv
32 RANLIB      ?= ranlib
34 CREATEDTDESC ?= $(TOOLDIR)/createdtdesc
36 all: $(OBJDIR) $(CREATEDTDESC) $(TOOLDIR)/examinedtdesc
38 $(CREATEDTDESC): $(OBJDIR)/createdtdesc.o $(CIFFLIBDIR)/libc_iff.a
39         @$(HOST_CC) $(HOST_LDFLAGS) -o $(CREATEDTDESC) $(OBJDIR)/createdtdesc.o -L$(CIFFLIBDIR)/ -lc_iff
41 $(TOOLDIR)/examinedtdesc: $(OBJDIR)/examinedtdesc.o $(CIFFLIBDIR)/libc_iff.a
42         @$(HOST_CC) -o $(TOOLDIR)/examinedtdesc $(OBJDIR)/examinedtdesc.o -L$(CIFFLIBDIR)/ -lc_iff
44 $(OBJDIR)/%.o : %.c
45         @$(HOST_CC) $(HOST_CFLAGS) $(INCL) -c $< -o $@
47 $(CIFFLIBDIR)/libc_iff.a:
48         @$(ECHO) Building libc_iff.a...
49         @$(CALL) $(MAKE) $(MKARGS) -C $(CIFFSRCDIR) -f Makefile.aros SRCDIR=$(SRCDIR) TOP=$(TOP)
51 $(OBJDIR):
52         @$(MKDIR) $(OBJDIR)
54 clean:
55         @$(MAKE) $(MKARGS) -C $(CIFFSRCDIR) -f Makefile.aros SRCDIR=$(SRCDIR) TOP=$(TOP) clean
56         @$(RM) -f *.o examinedtdesc $(CREATEDTDESC) $(OBJDIR)