1 # makefile für Scalos Menu.prefsplugin
4 #############################################################
8 SUBDIRMAKE
= $(MAKE
) -s
-C
19 ///SAS-lib
/snprintf.lib \
21 LDFLAGS
= quiet batch noicons
22 PRECOMP
= Include
:all.gst
25 PREFSPATH
= ..
/..
/..
/Prefs
/Menu
26 DATATYPESMCC_DIR
= ..
/..
/..
/common
/DataTypesMCC
27 COMMON_DIR
= ..
/..
/..
/common
/Plugin
31 #############################################################
33 CSRCS
= $(COMMON_DIR
)/plugin-classic.c \
36 $(DATATYPESMCC_DIR
)/DataTypesMCC.c \
38 #############################################################
40 PLUGIN
= Menu.prefsplugin
41 PLUGINDBG
= $(PLUGIN
).debug
42 CAT_FILE
= Scalos
/ScalosMenu.catalog
43 DESTTOOL
= Scalos
:Prefs
/
44 DESTCAT
= Locale
:Catalogs
45 SRCCAT
= $(subst ..
/,/,$(PREFSPATH
))
46 SCALOS_LOCALE
= $(OBJDIR
)/ScalosMenu_locale.h
47 CATCOMPHEADER
= $(SCALOS_LOCALE
)
57 ALLCATS
= $(foreach cat
,$(CATS
),$(SRCCAT
)/catalogs
/$(cat
)/$(CAT_FILE
))
59 #############################################################
61 CFLAGS
= optimize nostackcheck nover dbg
=s DATA
=far \
62 define SCALOSLOCALE
=$(SCALOS_LOCALE
) \
63 idlen
=64 idir
=///include \
64 idir
=$(subst ..
/,/,$(DATATYPESMCC_DIR
)) \
65 idir
=$(subst ..
/,/,$(PREFSPATH
)) \
67 AFLAGS
= quiet DS opt
=NRQB NOEXE linedebug I
=SC
:Assembler_Headers
68 #AFLAGS = -t -iINCLUDE:
71 #############################################################
74 @
[ -d
$(OBJDIR
) ] || mkdir
$(OBJDIR
) > /dev
/null
2>&1
76 XSRCS
= $(notdir $(CSRCS
))
77 OBJS
= $(ASRCS
:%.asm
=$(OBJDIR
)/%.o
) $(XSRCS
:%.c
=$(OBJDIR
)/$(notdir %).o
)
79 #############################################################
81 All
: $(BINDIR
)/$(PLUGIN
) \
82 $(BINDIR
)/$(PLUGINDBG
) \
87 #############################################################
89 $(OBJDIR
)/plugin-classic.o
: $(COMMON_DIR
)/plugin-classic.c
90 @printf
'\033[32mCompile: \033[31m\033[1m$<\033[0m\n'
91 @
$(CC
) $(CFLAGS
) $(subst ..
/,/,$<) objectname
$@
93 $(OBJDIR
)/DataTypesMCC.o
: $(DATATYPESMCC_DIR
)/DataTypesMCC.c
94 @printf
'\033[32mCompile: \033[31m\033[1m$<\033[0m\n'
95 @
$(CC
) $(CFLAGS
) $(subst ..
/,/,$<) objectname
$@
98 @printf
'\033[32mCompile: \033[31m\033[1m$<\033[0m\n'
99 @
$(CC
) $(CFLAGS
) $*.c objectname
$@
101 #############################################################
103 $(OBJDIR
)/plugin-classic.o
: $(COMMON_DIR
)/plugin-common.c \
104 plugin_data.h
$(COMMON_DIR
)/plugin.h
106 $(OBJDIR
)/DataTypesMCC.o
: $(DATATYPESMCC_DIR
)/DataTypesMCC.c \
107 $(DATATYPESMCC_DIR
)/DataTypesMCC.h
109 $(OBJDIR
)/MenuPrefs.o
: MenuPrefs.h MenuPrefsImage.h \
110 $(SCALOS_LOCALE
) plugin_data.h
$(COMMON_DIR
)/plugin.h
112 $(OBJDIR
)/DefaultMenu.o
: DefaultMenu.c MenuPrefs.h \
115 #############################################################
117 $(CATCOMPHEADER
) : $(PREFSPATH
)/ScalosMenu.cd
118 @printf
'\033[32mMake CatComp header: \033[31m\033[1m$@ \033[32mfrom \033[31m$<\033[0m\n'
119 $(FLEXCAT
) $(subst ..
/,/,$<) $@
=$(SDPATH
)/CatComp_h.sd
121 $(BINDIR
)/$(PLUGIN
) : $(OBJS
)
122 @printf
'\033[32mLink: \033[31m\033[1m$@\033[0m\n'
123 @
$(LD
) to
$@ FROM
$(OBJS
) lib
$(LIBS
) $(LDFLAGS
) STRIPDEBUG
125 $(BINDIR
)/$(PLUGINDBG
) : $(OBJS
)
126 @printf
'\033[32mLink: \033[31m\033[1m$@\033[0m\n'
127 @
$(LD
) to
$@ FROM
$(OBJS
) lib
$(LIBS
) $(LDFLAGS
) ADDSYM
129 #############################################################
133 @printf
'\033[32mInstall: \033[31m\033[1m$(PLUGIN)\033[0m\n'
134 @copy
$(BINDIR
)/$(PLUGIN
) $(DESTTOOL
)
135 @printf
'\033[32mInstall: \033[31m\033[1m$(CAT_FILE)\033[0m\n'
136 -@
$(foreach cat
,$(CATS
),copy
"$(SRCCAT)/catalogs/$(cat)/$(CAT_FILE)" "$(DESTCAT)/$(cat)/Scalos" clone
;)
138 #############################################################
141 @printf
'\033[32mCleanup: \033[31m\033[1m'
142 -@delete
$(BINDIR
)/$(PLUGIN
) $(BINDIR
)/$(PLUGINDBG
) $(OBJS
) $(subst ..
/,/,$(CATCOMPHEADER
)) $(ALLCATS
)
145 #############################################################
147 # make all Scalos preferences .catalogs
149 -@
$(foreach cat
,$(CATS
),$(SUBDIRMAKE
) $(PREFSPATH
)/catalogs
/$(cat
)/Scalos
;)
151 #############################################################