Initial import of Scalos. To decrease size I have
[AROS-Contrib.git] / scalos / Plugins / OOP / wb39_plugin / makefile
blob07990a455016799dc36baf09f369791c1337c56e
1 # makefile for several Scalos plugins
2 # $Date$
3 # using GNU make and SAS/C 6.58
6 #############################################################
8 SUBDIRMAKE = $(MAKE) -s -C
9 CC = sc
10 AS = phxass
11 PRECOMP = INCLUDE:All.gst
12 LD = slink
13 LDFLAGS = quiet batch noicons sd
14 LDLIBS = LIB:sc.lib LIB:debug.lib LIB:amiga.lib
15 OBJDIR = .sasobj
16 DESTPLUG = Scalos:Plugins/OOP
17 COMMON_DIR = ../../../common/Plugin
19 .SUFFIXES: .plugin .plugin.debug
21 #############################################################
23 SUBDIRS = persist \
24 volumegauge \
25 wbrexx \
27 #############################################################
29 # Optimizer Flags
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
34 ifdef DEBUG
35 CFLAGS = nostkchk nochkabort dbg=ff nover gst=$(PRECOMP) idlen=64 \
36 idir=///include \
37 idir=volumegauge \
38 idir=$(subst ../,/,$(DATATYPESMCC_DIR))
40 CFLAGS2 = nostkchk nochkabort dbg=ff nover gst=$(PRECOMP) idlen=64 \
41 idir=///include \
42 idir=volumegauge \
43 idir=$(subst ../,/,$(DATATYPESMCC_DIR))
44 CSTARTUP = LIB:c.o
45 else
46 CFLAGS = nostkchk nochkabort $(OPT_FLG) dbg=f def=NDEBUG \
47 def=NODEBUG nover gst=$(PRECOMP) idlen=64 \
48 idir=///include \
49 idir=volumegauge \
50 idir=$(subst ../,/,$(DATATYPESMCC_DIR))
51 CFLAGS2 = nostkchk nochkabort $(OPT_FLG2) dbg=f def=NDEBUG \
52 def=NODEBUG nover gst=$(PRECOMP) idlen=64 \
53 idir=///include \
54 idir=volumegauge \
55 idir=$(subst ../,/,$(DATATYPESMCC_DIR))
56 CSTARTUP = LIB:cback.o
57 endif
59 AFLAGS = quiet I=sc:Assembler_Headers
61 #############################################################
63 # Files for wb39.plugin
64 WB39NAME = wb39.plugin
66 WB39CSRCS = $(COMMON_DIR)/plugin-classic.c \
67 wb39.c \
68 AppWindow.c \
69 WorkbenchControl.c \
70 volumegauge/VolumeGauge.c \
71 AppIcons.c \
72 Scalos_Helper.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 #############################################################
83 all: $(WB39NAME) \
84 $(WB39NAME).debug \
85 allsubdirs \
86 test
87 # install
88 # clean
89 # $(DEFICONSNAME) $(DEFICONSNAME).debug
91 #############################################################
93 $(OBJDIR)::
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 $@
106 $(OBJDIR)/%.o : %.c
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 #############################################################
142 install:
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 #############################################################
149 clean:
150 @printf '\033[32mCleanup: \033[31m\033[1m'
151 -@delete $(WB39OBJS) \
152 $(OBJDIR)/test.o \
153 test \
154 $(WB39NAME) \
155 $(WB39NAME).debug
156 @printf '\033[0m'
157 -@$(foreach cat,$(SUBDIRS),$(SUBDIRMAKE) $(cat) clean;)
159 #############################################################
161 # make all subdirectories
162 allsubdirs:
163 -@$(foreach cat,$(SUBDIRS),$(SUBDIRMAKE) $(cat);)
165 #############################################################