1 # Copyright © 1995-2014, The AROS Development Team. All rights reserved.
2 # $Id: Makefile 44507 2012-04-03 16:09:41Z mazze $
4 # Desc: Makefile for FlexCat
7 include $(TOP)/config/make.cfg
9 USER_CFLAGS := -Wall -Werror -Wunused -O2
10 FLEXCAT_CFLAGS := $(HOST_CFLAGS)
12 ifeq ($(AROS_HOST_ARCH),linux)
13 FLEXCAT_CFLAGS += -D_XOPEN_SOURCE=500
32 OBJDIR := $(HOSTGENDIR)/tools/flexcat
34 SDFILES := C_h_aros.sd C_c_orig.sd C_h_orig.sd gcccatcomp.sd
35 SD_OUT := $(foreach f,$(SDFILES),$(TOOLDIR)/$(f))
38 all: $(OBJDIR) $(FLEXCAT) $(SD_OUT)
40 $(FLEXCAT) : $(addprefix $(OBJDIR)/,$(OBJS))
41 @$(ECHO) "Linking $(notdir $@)..."
42 @$(HOST_CC) $(HOST_LDFLAGS) $^ -o $@
46 @$(ECHO) "Compiling flexcat/src/$(notdir $@)..."
47 @$(HOST_CC) -MM -MP -MT '$@' -MF $(OBJDIR)/$(subst .c,.d,$<) $(FLEXCAT_CFLAGS) $<
48 @$(HOST_CC) -DNOERRORONWARN $(FLEXCAT_CFLAGS) -o $@ -c $<
50 $(TOOLDIR)/%.sd : sd/%.sd
54 @$(MKDIR) -p $(OBJDIR)
58 @$(RM) -rf $(OBJDIR) $(FLEXCAT)
60 -include $(OBJS:%.o=$(OBJDIR)/%.d)