don't check when its clang masquerading as gcc
[AROS.git] / tools / collect-aros / Makefile
bloba80475b393fa2a01ea6655d5a8db84ef3f6b5ea3
1 # Copyright © 2000-2009, The AROS Development Team. All rights reserved.
2 # $Id$
4 # Makefile to build collect-aros.
6 USER_CFLAGS += -Wall -Wunused -O2
7 -include $(TOP)/config/make.cfg
9 HOST_CC ?= $(CC)
10 HOST_STRIP ?= strip
11 MECHO ?= echo
12 COLLECT-AROS ?= collect-aros
13 RM ?= rm
14 COLLECT-AROS-BACKEND ?= backend-generic.c
15 COLLECT-AROS-DOCOMMAND ?= docommand-exec.c
16 ifneq ($(SRCDIR),)
17 COLLECT-AROS-DIR := $(TOP)/tools/collect-aros
18 else
19 COLLECT-AROS-DIR := .
20 endif
21 COLLECT_CFLAGS ?= $(HOST_CFLAGS) $(USER_CFLAGS) -I $(COLLECT-AROS-DIR)
23 ifeq ($(AROS_HOST_ARCH),aros)
24 COLLECT_CFLAGS += -D_HAVE_LIBIBERTY_
25 HOST_LDFLAGS += -lbfd -liberty -lz
26 COLLECT-AROS-BACKEND := backend-bfd.c
27 endif
28 ifeq ($(AROS_HOST_ARCH),mingw32)
29 COLLECT_CFLAGS += -D_HAVE_LIBIBERTY_
30 HOST_LDFLAGS += -liberty
31 COLLECT-AROS-DOCOMMAND := docommand-spawn.c
32 endif
34 all : $(COLLECT-AROS)
36 COLLECT-AROS-FILES := collect-aros.c gensets.c misc.c $(COLLECT-AROS-BACKEND) \
37 $(COLLECT-AROS-DOCOMMAND)
38 $(COLLECT-AROS) : misc.h ldscript.h gensets.h docommand.h backend.h $(COLLECT-AROS-DIR)/env.h
39 $(COLLECT-AROS) : $(COLLECT-AROS-FILES)
40 @$(MECHO) "Compiling $(notdir $@)..."
41 @$(HOST_CC) -o $@ $(COLLECT_CFLAGS) $(COLLECT-AROS-FILES) $(HOST_LDFLAGS)
44 clean :
45 @$(RM) $(COLLECT-AROS)
47 .PHONY : all clean