1# Makefile for linux/bsd/unix and gcc. Commands executed by: bash
2# To compile use a command shell and call:
3#   make depend
4#   make
5# If you are under windows you should use MinGW with mk_mingw.mak, mk_nmake.mak or mk_msys.mak instead.
6
7# CFLAGS =
8# CFLAGS = -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith
9# CFLAGS = -O2 -fomit-frame-pointer -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith
10# CFLAGS = -O2 -g -ffunction-sections -fdata-sections $(INCLUDE_OPTIONS) -Wall -Wextra -Wswitch-default -Wswitch-enum -Wcast-qual -Waggregate-return -Wwrite-strings -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith -Wmissing-noreturn -Wno-multichar -Wc++-compat
11# CFLAGS = -O2 -g -x c++ -Wall -Wextra -Wswitch-default -Wswitch-enum -Wcast-qual -Waggregate-return -Wwrite-strings -Winline -Wconversion -Wshadow -Wpointer-arith -Wmissing-noreturn -Wno-multichar
12# CFLAGS = -O2 -fomit-frame-pointer -Wall -Wextra -Wswitch-default -Wcast-qual -Waggregate-return -Wwrite-strings -Winline -Wconversion -Wshadow -Wpointer-arith -Wmissing-noreturn -Wno-multichar
13# CFLAGS = -O2 -g -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith -ftrapv
14# CFLAGS = -O2 -g -x c++ -Wall -Winline -Wconversion -Wshadow -Wpointer-arith
15# CFLAGS = -O2 -g -ffunction-sections -fdata-sections -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith -ftrapv
16CFLAGS = -O2 -g -ffunction-sections -fdata-sections $(INCLUDE_OPTIONS) $(CC_OPT_LINK_TIME_OPTIMIZATION) -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith
17# CFLAGS = -O2 -g -ffunction-sections -fdata-sections $(INCLUDE_OPTIONS) $(CC_OPT_LINK_TIME_OPTIMIZATION) -Wall -Winline -Wconversion -Wshadow -Wpointer-arith
18# CFLAGS = -O2 -g -std=c99 -D_POSIX_SOURCE -ffunction-sections -fdata-sections $(INCLUDE_OPTIONS) -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith
19# CFLAGS = -O2 -g -std=c1x -D_XOPEN_SOURCE -ffunction-sections -fdata-sections $(INCLUDE_OPTIONS) -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith
20# CFLAGS = -O2 -g -Wall -Winline -Wconversion -Wshadow -Wpointer-arith
21# CFLAGS = -O2 -g -Wall
22# CFLAGS = -O2 -g -pg -Wall -Wstrict-prototypes -Winline -Wconversion -Wshadow -Wpointer-arith
23# CFLAGS = -O2 -fomit-frame-pointer -funroll-loops -Wall
24# CFLAGS = -O2 -funroll-loops -Wall -pg
25LDFLAGS = -Wl,--gc-sections
26# LDFLAGS = -pg
27# LDFLAGS = -pg -lc_p
28SYSTEM_LIBS =
29# SYSTEM_LIBS = -lm -ldl -lgmp
30# SYSTEM_LIBS = -lm_p -lc_p
31# SYSTEM_BIGINT_LIBS is defined in the file "macros". The program chkccomp.c writes it to "macros" when doing "make depend".
32# SYSTEM_CONSOLE_LIBS is defined in the file "macros". The program chkccomp.c writes it to "macros" when doing "make depend".
33# SYSTEM_DATABASE_LIBS is defined in the file "macros". The program chkccomp.c writes it to "macros" when doing "make depend".
34# SYSTEM_DRAW_LIBS is defined in the file "macros". The program chkccomp.c writes it to "macros" when doing "make depend".
35SYSTEM_MATH_LIBS = -lm
36ALL_SYSTEM_LIBS = $(SYSTEM_LIBS) $(SYSTEM_BIGINT_LIBS) $(SYSTEM_CONSOLE_LIBS) $(SYSTEM_DATABASE_LIBS) $(SYSTEM_DRAW_LIBS) $(SYSTEM_MATH_LIBS)
37SEED7_LIB = seed7_05.a
38DRAW_LIB = s7_draw.a
39CONSOLE_LIB = s7_con.a
40DATABASE_LIB = s7_db.a
41COMP_DATA_LIB = s7_data.a
42COMPILER_LIB = s7_comp.a
43ALL_S7_LIBS = ../bin/$(COMPILER_LIB) ../bin/$(COMP_DATA_LIB) ../bin/$(DRAW_LIB) ../bin/$(CONSOLE_LIB) ../bin/$(DATABASE_LIB) ../bin/$(SEED7_LIB)
44# CC = g++
45CC = gcc
46AR = ar
47
48MOBJ = s7.o
49POBJ = runerr.o option.o primitiv.o
50LOBJ = actlib.o arrlib.o biglib.o binlib.o blnlib.o bstlib.o chrlib.o cmdlib.o conlib.o dcllib.o \
51       drwlib.o enulib.o fillib.o fltlib.o hshlib.o intlib.o itflib.o kbdlib.o lstlib.o pcslib.o \
52       pollib.o prclib.o prglib.o reflib.o rfllib.o sctlib.o setlib.o soclib.o sqllib.o strlib.o \
53       timlib.o typlib.o ut8lib.o
54EOBJ = exec.o doany.o objutl.o
55AOBJ = act_comp.o prg_comp.o analyze.o syntax.o token.o parser.o name.o type.o \
56       expr.o atom.o object.o scanner.o literal.o numlit.o findid.o \
57       error.o infile.o libpath.o symbol.o info.o stat.o fatal.o match.o
58GOBJ = syvarutl.o traceutl.o actutl.o executl.o blockutl.o \
59       entutl.o identutl.o chclsutl.o arrutl.o
60ROBJ = arr_rtl.o bln_rtl.o bst_rtl.o chr_rtl.o cmd_rtl.o con_rtl.o dir_rtl.o drw_rtl.o fil_rtl.o \
61       flt_rtl.o hsh_rtl.o int_rtl.o itf_rtl.o pcs_rtl.o set_rtl.o soc_rtl.o sql_rtl.o str_rtl.o \
62       tim_rtl.o ut8_rtl.o heaputl.o numutl.o sigutl.o striutl.o
63DOBJ = big_rtl.o big_gmp.o cmd_unx.o dir_win.o dll_unx.o fil_unx.o pcs_unx.o pol_unx.o soc_none.o \
64       tim_unx.o
65OBJ = $(MOBJ)
66SEED7_LIB_OBJ = $(ROBJ) $(DOBJ)
67DRAW_LIB_OBJ = gkb_rtl.o drw_x11.o gkb_x11.o fwd_x11.o
68CONSOLE_LIB_OBJ = kbd_rtl.o con_inf.o kbd_inf.o kbd_poll.o trm_inf.o trm_cap.o fwd_term.o
69DATABASE_LIB_OBJ = sql_base.o sql_db2.o sql_fire.o sql_lite.o sql_my.o sql_oci.o sql_odbc.o \
70                   sql_post.o sql_srv.o sql_tds.o
71COMP_DATA_LIB_OBJ = typ_data.o rfl_data.o ref_data.o listutl.o flistutl.o typeutl.o datautl.o
72COMPILER_LIB_OBJ = $(POBJ) $(LOBJ) $(EOBJ) $(AOBJ) $(GOBJ)
73
74MSRC = s7.c
75PSRC = runerr.c option.c primitiv.c
76LSRC = actlib.c arrlib.c biglib.c binlib.c blnlib.c bstlib.c chrlib.c cmdlib.c conlib.c dcllib.c \
77       drwlib.c enulib.c fillib.c fltlib.c hshlib.c intlib.c itflib.c kbdlib.c lstlib.c pcslib.c \
78       pollib.c prclib.c prglib.c reflib.c rfllib.c sctlib.c setlib.c soclib.c sqllib.c strlib.c \
79       timlib.c typlib.c ut8lib.c
80ESRC = exec.c doany.c objutl.c
81ASRC = act_comp.c prg_comp.c analyze.c syntax.c token.c parser.c name.c type.c \
82       expr.c atom.c object.c scanner.c literal.c numlit.c findid.c \
83       error.c infile.c libpath.c symbol.c info.c stat.c fatal.c match.c
84GSRC = syvarutl.c traceutl.c actutl.c executl.c blockutl.c \
85       entutl.c identutl.c chclsutl.c arrutl.c
86RSRC = arr_rtl.c bln_rtl.c bst_rtl.c chr_rtl.c cmd_rtl.c con_rtl.c dir_rtl.c drw_rtl.c fil_rtl.c \
87       flt_rtl.c hsh_rtl.c int_rtl.c itf_rtl.c pcs_rtl.c set_rtl.c soc_rtl.c sql_rtl.c str_rtl.c \
88       tim_rtl.c ut8_rtl.c heaputl.c numutl.c sigutl.c striutl.c
89DSRC = big_rtl.c big_gmp.c cmd_unx.c dir_win.c dll_unx.c fil_unx.c pcs_unx.c pol_unx.c soc_none.c \
90       tim_unx.c
91SRC = $(MSRC)
92SEED7_LIB_SRC = $(RSRC) $(DSRC)
93DRAW_LIB_SRC = gkb_rtl.c drw_x11.c gkb_x11.c fwd_x11.c
94CONSOLE_LIB_SRC = kbd_rtl.c con_inf.c kbd_inf.c kbd_poll.c trm_inf.c trm_cap.c fwd_term.c
95DATABASE_LIB_SRC_STD_INCL = sql_base.c sql_fire.c sql_lite.c sql_my.c sql_oci.c sql_odbc.c \
96                            sql_post.c sql_tds.c
97DATABASE_LIB_SRC = $(DATABASE_LIB_SRC_STD_INCL) sql_db2.c sql_srv.c
98COMP_DATA_LIB_SRC = typ_data.c rfl_data.c ref_data.c listutl.c flistutl.c typeutl.c datautl.c
99COMPILER_LIB_SRC = $(PSRC) $(LSRC) $(ESRC) $(ASRC) $(GSRC)
100
101s7: ../bin/s7 ../prg/s7
102	../bin/s7 -l ../lib level
103	@echo
104	@echo "  Use 'make s7c' (with your make command) to create the compiler."
105	@echo
106
107s7c: ../bin/s7c ../prg/s7c
108	@echo
109	@echo "  Use 'make test' (with your make command) to check Seed7."
110	@echo
111
112../bin/s7: levelup next_lvl $(OBJ) $(ALL_S7_LIBS)
113	$(CC) $(LDFLAGS) $(OBJ) $(ALL_S7_LIBS) $(ALL_SYSTEM_LIBS) -o ../bin/s7
114	rm next_lvl
115
116../prg/s7:
117	ln -s ../bin/s7 ../prg
118
119../bin/s7c: ../prg/s7c
120	cp -p ../prg/s7c ../bin
121
122../prg/s7c: ../prg/s7c.sd7 $(ALL_S7_LIBS)
123	../bin/s7 -l ../lib ../prg/s7c -l ../lib -b ../bin -O2 ../prg/s7c
124
125levelup: levelup.c
126	$(CC) levelup.c -o levelup
127
128next_lvl: levelup
129	./levelup
130	echo "X" > next_lvl
131
132OBJCOPY_PARAMS = \
133       -L SQLAllocHandle -L SQLBindCol -L SQLBindParameter -L SQLBrowseConnectW -L SQLColAttributeW \
134       -L SQLConnectW -L SQLDataSources -L SQLDescribeColW -L SQLDescribeParam -L SQLDisconnect \
135       -L SQLDriverConnectW -L SQLDriversW -L SQLExecute -L SQLFetch -L SQLFreeHandle \
136       -L SQLFreeStmt -L SQLGetData -L SQLGetDiagRecW -L SQLGetInfoW -L SQLGetStmtAttrW \
137       -L SQLGetTypeInfoW -L SQLNumParams -L SQLNumResultCols -L SQLPrepareW -L SQLSetDescFieldW \
138       -L SQLSetEnvAttr
139
140sql_db2.o: sql_db2.c
141	$(CC) $(CPPFLAGS) $(DB2_INCLUDE_OPTION) $(CFLAGS) $(DB2_LIBS) -c -r -o $@ $<
142	objcopy $(OBJCOPY_PARAMS) $@
143
144sql_srv.o: sql_srv.c
145	$(CC) $(CPPFLAGS) $(SQL_SERVER_INCLUDE_OPTION) $(CFLAGS) $(SQL_SERVER_LIBS) -c -r -o $@ $<
146	objcopy $(OBJCOPY_PARAMS) $@
147
148all: depend
149	$(MAKE) s7 s7c
150
151clear: clean
152
153clean:
154	rm -f *.o ../bin/*.a ../bin/s7 ../bin/s7c ../prg/s7 ../prg/s7c depend macros chkccomp.h base.h settings.h version.h wrdepend levelup next_lvl
155	@echo
156	@echo "  Use 'make depend' (with your make command) to create the dependencies."
157	@echo
158
159clean_utils:
160	rm -f ../bin/bas7 ../bin/bigfiles ../bin/calc7 ../bin/cat ../bin/comanche ../bin/db7 ../bin/diff7 ../bin/find7 ../bin/findchar ../bin/ftp7
161	rm -f ../bin/ftpserv ../bin/hd ../bin/ide7 ../bin/make7 ../bin/pv7 ../bin/sql7 ../bin/sydir7 ../bin/tar7 ../bin/toutf8 ../bin/which
162
163distclean: clean clean_utils
164	cp level_bk.h level.h
165	rm -f vers_linux.h
166
167test:
168	../bin/s7 -l ../lib ../prg/chk_all build
169	@echo
170	@echo "  Use 'sudo make install' (with your make command) to install Seed7."
171	@echo
172
173install:
174	cd ../bin; ln -fs `pwd`/s7 /usr/local/bin
175	cd ../bin; ln -fs `pwd`/s7c /usr/local/bin
176	gzip -c ../doc/s7.1 > /usr/share/man/man1/s7.1.gz
177	gzip -c ../doc/s7c.1 > /usr/share/man/man1/s7c.1.gz
178	cd ../bin; ln -fs `pwd`/bas7 /usr/local/bin
179	cd ../bin; ln -fs `pwd`/calc7 /usr/local/bin
180	cd ../bin; ln -fs `pwd`/db7 /usr/local/bin
181	cd ../bin; ln -fs `pwd`/diff7 /usr/local/bin
182	cd ../bin; ln -fs `pwd`/find7 /usr/local/bin
183	cd ../bin; ln -fs `pwd`/ftp7 /usr/local/bin
184	cd ../bin; ln -fs `pwd`/ide7 /usr/local/bin
185	cd ../bin; ln -fs `pwd`/make7 /usr/local/bin
186	cd ../bin; ln -fs `pwd`/pv7 /usr/local/bin
187	cd ../bin; ln -fs `pwd`/sql7 /usr/local/bin
188	cd ../bin; ln -fs `pwd`/sydir7 /usr/local/bin
189	cd ../bin; ln -fs `pwd`/tar7 /usr/local/bin
190	cd ../bin; ln -fs `pwd`/toutf8 /usr/local/bin
191
192uninstall:
193	rm -f /usr/local/bin/s7
194	rm -f /usr/local/bin/s7c
195	rm -f /usr/share/man/man1/s7.1.gz
196	rm -f /usr/share/man/man1/s7c.1.gz
197	rm -f /usr/local/bin/bas7
198	rm -f /usr/local/bin/calc7
199	rm -f /usr/local/bin/db7
200	rm -f /usr/local/bin/diff7
201	rm -f /usr/local/bin/find7
202	rm -f /usr/local/bin/ftp7
203	rm -f /usr/local/bin/ide7
204	rm -f /usr/local/bin/make7
205	rm -f /usr/local/bin/pv7
206	rm -f /usr/local/bin/sql7
207	rm -f /usr/local/bin/sydir7
208	rm -f /usr/local/bin/tar7
209	rm -f /usr/local/bin/toutf8
210
211dep: depend
212
213strip:
214	strip ../bin/s7
215
216chkccomp.h:
217	echo "#define LIST_DIRECTORY_CONTENTS \"ls\"" > chkccomp.h
218	echo "#define CC_OPT_LINK_TIME_OPTIMIZATION \"-flto\"" >> chkccomp.h
219	echo "#define LINKER_OPT_STATIC_LINKING \"-static\"" >> chkccomp.h
220	echo "#define LINKER_OPT_NO_LTO \"-fno-lto\"" >> chkccomp.h
221	echo "#define LINKER_OPT_DYN_LINK_LIBS \"-ldl\"" >> chkccomp.h
222	echo "#define SUPPORTS_PARTIAL_LINKING" >> chkccomp.h
223	echo "#define ALLOW_REPLACEMENT_OF_SYSTEM_HEADERS" >> chkccomp.h
224
225base.h:
226	echo "#define PATH_DELIMITER '/'" > base.h
227	echo "#define OBJECT_FILE_EXTENSION \".o\"" >> base.h
228	echo "#define C_COMPILER \"$(CC)\"" >> base.h
229	echo "#define CC_OPT_VERSION_INFO \"--version\"" >> base.h
230	echo "#define CC_FLAGS \"-ffunction-sections -fdata-sections\"" >> base.h
231	echo "#define CC_ERROR_FILEDES 2" >> base.h
232	echo "#define CC_VERSION_INFO_FILEDES 1" >> base.h
233	echo "#define LINKER_OPT_OUTPUT_FILE \"-o \"" >> base.h
234	echo "#define ARCHIVER \"$(AR)\"" >> base.h
235	echo "#define ARCHIVER_OPT_REPLACE \"r \"" >> base.h
236	echo "#define SYSTEM_LIBS \"$(SYSTEM_LIBS)\"" >> base.h
237	echo "#define SYSTEM_MATH_LIBS \"$(SYSTEM_MATH_LIBS)\"" >> base.h
238
239settings.h:
240	echo "#define MAKE_UTILITY_NAME \"$(MAKE)\"" > settings.h
241	echo "#define MAKEFILE_NAME \"makefile\"" >> settings.h
242	echo "#define SEARCH_PATH_DELIMITER ':'" >> settings.h
243	echo "#define AWAIT_WITH_SELECT" >> settings.h
244	echo "#define SIGNAL_HANDLER_CAN_DO_IO" >> settings.h
245	echo "#define CONSOLE_UTF8" >> settings.h
246	echo "#define OS_STRI_UTF8" >> settings.h
247	echo "#define ESCAPE_SHELL_COMMANDS" >> settings.h
248	echo "#define LIBRARY_FILE_EXTENSION \".a\"" >> settings.h
249	echo "#define CPLUSPLUS_COMPILER \"g++\"" >> settings.h
250	echo "#define CC_SOURCE_UTF8" >> settings.h
251	echo "#define CC_OPT_DEBUG_INFO \"-g\"" >> settings.h
252	echo "#define CC_OPT_NO_WARNINGS \"-w\"" >> settings.h
253	echo "#define LINKER_OPT_NO_DEBUG_INFO \"-Wl,--strip-debug\"" >> settings.h
254	echo "#define LINKER_FLAGS \"$(LDFLAGS)\"" >> settings.h
255	echo "#define SEED7_LIB \"$(SEED7_LIB)\"" >> settings.h
256	echo "#define DRAW_LIB \"$(DRAW_LIB)\"" >> settings.h
257	echo "#define CONSOLE_LIB \"$(CONSOLE_LIB)\"" >> settings.h
258	echo "#define DATABASE_LIB \"$(DATABASE_LIB)\"" >> settings.h
259	echo "#define COMP_DATA_LIB \"$(COMP_DATA_LIB)\"" >> settings.h
260	echo "#define COMPILER_LIB \"$(COMPILER_LIB)\"" >> settings.h
261
262version.h: chkccomp.h base.h settings.h
263	$(CC) chkccomp.c -o chkccomp
264	./chkccomp version.h
265	rm chkccomp
266	$(CC) setpaths.c -o setpaths
267	./setpaths "S7_LIB_DIR=$(S7_LIB_DIR)" "SEED7_LIBRARY=$(SEED7_LIBRARY)" >> version.h
268	rm setpaths
269	$(CC) wrdepend.c -o wrdepend
270	cp version.h vers_linux.h
271
272depend: version.h
273	./wrdepend OPTION=INCLUDE_OPTIONS $(CFLAGS) -M $(SRC) "> depend"
274	./wrdepend OPTION=INCLUDE_OPTIONS $(CFLAGS) -M $(SEED7_LIB_SRC) ">> depend"
275	./wrdepend OPTION=INCLUDE_OPTIONS $(CFLAGS) -M $(DRAW_LIB_SRC) ">> depend"
276	./wrdepend OPTION=INCLUDE_OPTIONS $(CFLAGS) -M $(CONSOLE_LIB_SRC) ">> depend"
277	./wrdepend OPTION=INCLUDE_OPTIONS $(CFLAGS) -M $(DATABASE_LIB_SRC_STD_INCL) ">> depend"
278	./wrdepend OPTION=DB2_INCLUDE_OPTION $(CFLAGS) -M sql_db2.c ">> depend"
279	./wrdepend OPTION=SQL_SERVER_INCLUDE_OPTION $(CFLAGS) -M sql_srv.c ">> depend"
280	./wrdepend OPTION=INCLUDE_OPTIONS $(CFLAGS) -M $(COMP_DATA_LIB_SRC) ">> depend"
281	./wrdepend OPTION=INCLUDE_OPTIONS $(CFLAGS) -M $(COMPILER_LIB_SRC) ">> depend"
282	$(CC) warn.c -o warn
283	@./warn
284	@rm warn
285	@echo
286	@echo "  Use 'make' (with your make command) to create the interpreter."
287	@echo
288
289../bin/$(SEED7_LIB): $(SEED7_LIB_OBJ)
290	$(AR) r ../bin/$(SEED7_LIB) $(SEED7_LIB_OBJ)
291
292../bin/$(DRAW_LIB): $(DRAW_LIB_OBJ)
293	$(AR) r ../bin/$(DRAW_LIB) $(DRAW_LIB_OBJ)
294
295../bin/$(CONSOLE_LIB): $(CONSOLE_LIB_OBJ)
296	$(AR) r ../bin/$(CONSOLE_LIB) $(CONSOLE_LIB_OBJ)
297
298../bin/$(DATABASE_LIB): $(DATABASE_LIB_OBJ)
299	$(AR) r ../bin/$(DATABASE_LIB) $(DATABASE_LIB_OBJ)
300
301../bin/$(COMP_DATA_LIB): $(COMP_DATA_LIB_OBJ)
302	$(AR) r ../bin/$(COMP_DATA_LIB) $(COMP_DATA_LIB_OBJ)
303
304../bin/$(COMPILER_LIB): $(COMPILER_LIB_OBJ)
305	$(AR) r ../bin/$(COMPILER_LIB) $(COMPILER_LIB_OBJ)
306
307../bin/%: ../prg/%.sd7 ../bin/s7c
308	../bin/s7c -l ../lib -b ../bin -O3 -oc3 $<
309	mv $(<:.sd7=) ../bin
310
311bas7: ../bin/bas7
312bigfiles: ../bin/bigfiles
313calc7: ../bin/calc7
314cat: ../bin/cat
315comanche: ../bin/comanche
316db7: ../bin/db7
317diff7: ../bin/diff7
318find7: ../bin/find7
319findchar: ../bin/findchar
320ftp7: ../bin/ftp7
321ftpserv: ../bin/ftpserv
322hd: ../bin/hd
323ide7: ../bin/ide7
324make7: ../bin/make7
325pv7: ../bin/pv7
326sql7: ../bin/sql7
327sydir7: ../bin/sydir7
328tar7: ../bin/tar7
329toutf8: ../bin/toutf8
330which: ../bin/which
331
332utils: ../bin/bas7 ../bin/bigfiles ../bin/calc7 ../bin/cat ../bin/comanche ../bin/db7 \
333       ../bin/diff7 ../bin/find7 ../bin/findchar ../bin/ftp7 ../bin/ftpserv ../bin/hd ../bin/ide7 \
334       ../bin/make7 ../bin/pv7 ../bin/sql7 ../bin/sydir7 ../bin/tar7 ../bin/toutf8 ../bin/which
335
336wc: $(SRC)
337	@echo SRC:
338	wc $(SRC)
339	@echo SEED7_LIB_SRC:
340	wc $(SEED7_LIB_SRC)
341	@echo DRAW_LIB_SRC:
342	wc $(DRAW_LIB_SRC)
343	@echo CONSOLE_LIB_SRC:
344	wc $(CONSOLE_LIB_SRC)
345	@echo DATABASE_LIB_SRC:
346	wc $(DATABASE_LIB_SRC)
347	@echo COMP_DATA_LIB_SRC:
348	wc $(COMP_DATA_LIB_SRC)
349	@echo COMPILER_LIB_SRC:
350	wc $(COMPILER_LIB_SRC)
351
352lint: $(SRC)
353	lint -p $(SRC) $(ALL_SYSTEM_LIBS)
354
355lint2: $(SRC)
356	lint -Zn2048 $(SRC) $(ALL_SYSTEM_LIBS)
357
358cppcheck: $(SRC) $(SEED7_LIB_SRC) $(DRAW_LIB_SRC) $(COMP_DATA_LIB_SRC) $(COMPILER_LIB_SRC)
359	cppcheck --force --enable=all $(SRC) $(SEED7_LIB_SRC) $(DRAW_LIB_SRC) $(COMP_DATA_LIB_SRC) $(COMPILER_LIB_SRC)
360
361ifeq (depend,$(wildcard depend))
362include depend
363endif
364
365ifeq (macros,$(wildcard macros))
366include macros
367endif
368