1 # Copyright © 1995-2001, The AROS Development Team. All rights reserved.
4 # Desc: Make the tool library.
6 SRC
= error filesup hash lineparser mystream \
7 stdiocb stringcb toollib vstring
9 # Include the AROS build information. This will fail if $(TOP) is not
10 # set, and build in the current directory.
11 -include $(TOP
)/config
/make.cfg
13 # If the include above doesn't work, we need some defaults.
17 ifneq ($(HOSTGENDIR
),)
18 OBJDIR
:= $(HOSTGENDIR
)/$(CURDIR
)
20 OBJDIR
:= $(TOOLDIR
)/obj
24 TOOLLIB ?
= $(TOOLDIR
)/libtool.a
25 HOST_CFLAGS
:= $(HOST_CFLAGS
) -Wall
-g
-DHAVE_VSNPRINTF
-I..
-O
28 DEPS
:= $(foreach f
,$(SRC
),$(OBJDIR
)/$(f
).d
)
30 all : depend
$(OBJDIR
) $(TOOLLIB
)
32 $(TOOLLIB
) : $(foreach f
,$(SRC
),$(OBJDIR
)/$(f
).o
)
33 @
$(MECHO
) "Creating toollib/$(notdir $@)..."
37 @
$(MECHO
) "Compiling toollib/$(notdir $@)..."
38 @
$(HOST_CC
) $(HOST_CFLAGS
) -o
$@
-c
$<
41 @
$(MECHO
) Finding dependencies for
$<...
42 @
$(MKDIR
) -p
$(dir $@
)
43 @
$(HOST_CC
) $(HOST_CFLAGS
) -M
$< > $@
49 -@
$(RM
) -r
$(OBJDIR
) $(TOOLLIB
)
50 @sed
'/^# DO NOT DELETE$$/,$$d' Makefile
> Makefile.tmp
51 @echo
"# DO NOT DELETE" >> Makefile.tmp
52 @mv
-f Makefile.tmp Makefile