compiler/clib/include: removed unused & unneeded files.
[AROS.git] / tools / toollib / Makefile
blob9d14119e4aa8bd98d714fcc834c002a3d34101be
1 # Copyright © 1995-2001, The AROS Development Team. All rights reserved.
2 # $Id$
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 # Values relating to stuff.
14 PURIFY = /home/digulla/AROS/compiler/purify/purify
16 # If the include above doesn't work, we need some defaults.
17 HOST_CC ?= $(CC)
18 HOST_AR ?= $(AR) cru
19 TOOLDIR ?= .
20 ifneq ($(HOSTGENDIR),)
21 OBJDIR := $(HOSTGENDIR)/$(CURDIR)
22 else
23 OBJDIR := $(TOOLDIR)/obj
24 endif
25 MKDIR ?= mkdir
26 MECHO ?= echo
27 TOOLLIB ?= $(TOOLDIR)/libtool.a
28 HOST_CFLAGS := $(HOST_CFLAGS) -Wall -g -DHAVE_VSNPRINTF -I.. -O
31 DEPS := $(foreach f,$(SRC),$(OBJDIR)/$(f).d)
33 all : depend $(OBJDIR) $(TOOLLIB)
35 $(TOOLLIB) : $(foreach f,$(SRC),$(OBJDIR)/$(f).o)
36 @$(MECHO) "Creating toollib/$(notdir $@)..."
37 @$(HOST_AR) $@ $?
39 $(OBJDIR)/%.o : %.c
40 @$(MECHO) "Compiling toollib/$(notdir $@)..."
41 @$(HOST_CC) $(HOST_CFLAGS) -o $@ -c $<
43 $(OBJDIR)/%.d : %.c
44 @$(MECHO) Finding dependencies for $<...
45 @$(MKDIR) -p $(dir $@)
46 @$(HOST_CC) $(HOST_CFLAGS) -M $< > $@
48 $(OBJDIR) :
49 @$(MKDIR) $(OBJDIR)
51 pure :
52 -@rm *.o
53 @$(MAKE) "CC=$(PURIFY) $(CC)"
55 clean :
56 -@$(RM) -r $(OBJDIR) $(TOOLLIB)
57 @sed '/^# DO NOT DELETE$$/,$$d' Makefile > Makefile.tmp
58 @echo "# DO NOT DELETE" >> Makefile.tmp
59 @mv -f Makefile.tmp Makefile
60 -@$(RM) Makefile.bak
62 depend : $(DEPS)
64 -include $(DEPS)
65 # DO NOT DELETE