1 # makefile for several Scalos plugins
3 # using GNU make and SAS/C 6.58
6 #############################################################
8 SUBDIRMAKE
= $(MAKE
) -s
-C
11 PRECOMP
= INCLUDE
:All.gst
13 LDFLAGS
= quiet batch noicons sd
14 LDLIBS
= LIB
:sc.lib LIB
:debug.lib LIB
:amiga.lib
16 DESTPLUG
= Scalos
:Plugins
/OOP
17 COMMON_DIR
= ..
/..
/..
/common
/Plugin
19 .SUFFIXES
: .plugin .plugin.debug
21 #############################################################
27 #############################################################
30 # Ignore Note 306: local function inlined: "InsertMH"
31 OPT_FLG
= OPTIMIZE OPTINLOCAL OPTTIME OPTSCHED IGNORE
=306,308 ERROR
=87
32 OPT_FLG2
= NOOPTIMIZE IGNORE
=306,308 ERROR
=87
35 CFLAGS
= nostkchk nochkabort dbg
=ff nover gst
=$(PRECOMP
) idlen
=64 \
38 idir
=$(subst ..
/,/,$(DATATYPESMCC_DIR
))
40 CFLAGS2
= nostkchk nochkabort dbg
=ff nover gst
=$(PRECOMP
) idlen
=64 \
43 idir
=$(subst ..
/,/,$(DATATYPESMCC_DIR
))
46 CFLAGS
= nostkchk nochkabort
$(OPT_FLG
) dbg
=f def
=NDEBUG \
47 def
=NODEBUG nover gst
=$(PRECOMP
) idlen
=64 \
50 idir
=$(subst ..
/,/,$(DATATYPESMCC_DIR
))
51 CFLAGS2
= nostkchk nochkabort
$(OPT_FLG2
) dbg
=f def
=NDEBUG \
52 def
=NODEBUG nover gst
=$(PRECOMP
) idlen
=64 \
55 idir
=$(subst ..
/,/,$(DATATYPESMCC_DIR
))
56 CSTARTUP
= LIB
:cback.o
59 AFLAGS
= quiet I
=sc
:Assembler_Headers
61 #############################################################
63 # Files for wb39.plugin
64 WB39NAME
= wb39.plugin
66 WB39CSRCS
= $(COMMON_DIR
)/plugin-classic.c \
70 volumegauge
/VolumeGauge.c \
74 XSRCS
= $(notdir $(WB39CSRCS
))
75 WB39OBJS
= $(XSRCS
:%.c
=$(OBJDIR
)/$(notdir %).o
)
77 #############################################################
79 LIBS
= LIB
:mempools.lib LIB
:sc.lib LIB
:debug.lib LIB
:amiga.lib
81 #############################################################
89 # $(DEFICONSNAME) $(DEFICONSNAME).debug
91 #############################################################
94 @
[ -d
$(OBJDIR
) ] || mkdir
$(OBJDIR
) > /dev
/null
2>&1
96 #############################################################
98 $(OBJDIR
)/plugin-classic.o
: $(COMMON_DIR
)/plugin-classic.c
99 @printf
'\033[32mCompile: \033[31m\033[1m$<\033[0m\n'
100 @
$(CC
) $(CFLAGS
) $(subst ..
/,/,$<) objectname
$@
102 $(OBJDIR
)/VolumeGauge.o
: volumegauge
/VolumeGauge.c
103 @printf
'\033[32mCompile: \033[31m\033[1m$<\033[0m\n'
104 @
$(CC
) $(CFLAGS
) $(subst ..
/,/,$<) objectname
$@
107 @printf
'\033[32mCompile: \033[31m\033[1m$<\033[0m\n'
108 @
$(CC
) $(CFLAGS
) $*.c objectname
$@
110 $(OBJDIR
)/wb39.o
: wb39.c
111 @printf
'\033[32mCompile: \033[31m\033[1m$<\033[0m\n'
112 @
$(CC
) $(CFLAGS2
) $< objectname
$@
114 #############################################################
116 $(OBJDIR
)/plugin-classic.o
: $(COMMON_DIR
)/plugin-classic.c \
117 $(COMMON_DIR
)/plugin-common.c
$(COMMON_DIR
)/plugin.h plugin_data.h
119 $(OBJDIR
)/wb39.o AppWindow.o WorkbenchControl.o VolumeGauge.o \
120 AppIcons.o Scalos_Helper.o
: wb39.h
122 $(OBJDIR
)/wb39.o VolumeGauge.o vg_plugin.o
: volumegauge
/VolumeGauge.h
124 #############################################################
126 $(WB39NAME
): $(WB39OBJS
)
127 @printf
'\033[32mLink: \033[31m\033[1m$@\033[0m\n'
128 @
$(LD
) FROM
$(WB39OBJS
) TO
$(WB39NAME
) lib
$(LIBS
) $(LDFLAGS
) STRIPDEBUG
130 $(WB39NAME
).debug
: $(WB39OBJS
)
131 @printf
'\033[32mLink: \033[31m\033[1m$@\033[0m\n'
132 @
$(LD
) FROM
$(WB39OBJS
) TO
$(WB39NAME
).debug lib
$(LIBS
) $(LDFLAGS
) ADDSYM
134 #############################################################
136 test: $(OBJDIR
)/test.o
137 @printf
'\033[32mLink: \033[31m\033[1m$@\033[0m\n'
138 @
$(LD
) FROM LIB
:c.o
$(OBJDIR
)/test.o TO
$@ LIB
$(LIBS
) $(LDFLAGS
) $(DBFLAG
)
140 #############################################################
143 @printf
'\033[32mInstall: \033[31m\033[1m$(WB39NAME).\033[0m\n'
144 @copy
$(WB39NAME
) $(DESTPLUG
) clone
145 -@
$(foreach cat
,$(SUBDIRS
),$(SUBDIRMAKE
) $(cat
) install;)
147 #############################################################
150 @printf
'\033[32mCleanup: \033[31m\033[1m'
151 -@delete
$(WB39OBJS
) \
157 -@
$(foreach cat
,$(SUBDIRS
),$(SUBDIRMAKE
) $(cat
) clean;)
159 #############################################################
161 # make all subdirectories
163 -@
$(foreach cat
,$(SUBDIRS
),$(SUBDIRMAKE
) $(cat
);)
165 #############################################################