modified makefile to allow easier adjustment of build options for different targets...
[AROS-Contrib.git] / scalos / Modules / IconProperties.MUI / makefile-new
blob73642511db38760a5772e55bfd21d6f34722209e
1 # $Date: 2011-07-12 02:12:04 +0200 (Di, 12. Jul 2011) $
2 # $Revision: 772 $
3 ##############################################################################
5 ifndef TOPLEVEL
6         TOPLEVEL        =       $(shell pwd)/../..
7 endif
9 # Native FlexCat doesn't like Linux paths
10 ifeq ($(CROSS), )
11         SDPATH=/
12 else
13         SDPATH=../..
14 endif
16 ##############################################################################
18 include         config.mk
20 ##############################################################################
22 # Project Object files
25 OBJS    =       $(OBJDIR)/IconProperties.o \
26                 $(OBJDIR)/IconobjectMCC.o \
27                 $(OBJDIR)/ToolTypes.o \
29 ##############################################################################
31 # Autodependencies
33 ifneq ($(MAKECMDGOALS),clean)
34         -include $(OBJS:.o=.d)
35 endif
37 ##############################################################################
39 # Subdirs
42 SUBDIRS =       $(filter-out Catalogs/sample/Scalos, $(wildcard Catalogs/*/Scalos))
44 ##############################################################################
46 # Targets
49 NAME    =       IconProperties.module
50 NAME_DB =       $(NAME).debug
52 ##############################################################################
54 .PHONY: all install clean bump dump nodebug
56 all:    $(BINDIR)/$(NAME) \
57         $(BINDIR)/$(NAME_DB) \
58         all_subdirs
60 ##############################################################################
62 $(OBJDIR)/%.o: $(TOOLTYPE_DIR)/%.c
63         @$(run-cc)
65 $(OBJDIR)/%.o: $(ICONOBJMCC_DIR)/%.c
66         @$(run-cc)
68 IconProperties.c : $(OBJDIR)/IconProperties_Locale.h
70 $(OBJDIR)/IconProperties_Locale.h : IconProperties.cd
71         @$(ECHO) "FlexCat $@"
72         $(FLEXCAT) $< $@=$(SDPATH)/CatComp_h.sd
74 ##############################################################################
76 $(BINDIR)/$(NAME) $(BINDIR)/$(NAME_DB) : $(OBJS)
77         $(ECHO) "Link $(NAME)"
78         @$(CC) $(OBJS) $(LFLAGS) $(DEFINES) -o$(BINDIR)/$(NAME_DB)
79         @$(STRIP) $(SFLAGS) $(BINDIR)/$(NAME_DB) -o $(BINDIR)/$(NAME)
80 ifneq ($(MACHINE), ppc-amigaos)
81         -@chmod u+x $@
82 endif
84 ##############################################################################
86 install: install_subdirs
88 install:
89         -@$(ECHO) "Installing $(NAME)"
90         @copy $(BINDIR)/$(NAME) Scalos:modules/ clone
92 clean:  clean_subdirs
94 clean:
95         -@$(RM) -frv $(OBJDIR)/*.o $(OBJDIR)/*.d $(OBJDIR)/*.d.* \
96                 $(OBJDIR)/*.i $(OBJDIR)/*.s \
97                 $(BINDIR)/$(NAME) $(BINDIR)/$(NAME_DB) \
98                 *.dump *_str.* \
99                 $(OBJDIR)/IconProperties_Locale.h
101 ##############################################################################