1HOME=.
2!include $(HOME)\src\graphics\msdos\watcom.dep
3
4all: core drivers sarien
5
6core: .symbolic
7	@echo Building core engine
8	cd src\core
9	wmake -h -f makefile.wat HOME=..\..
10
11drivers: .symbolic
12	@echo Building master graphics driver
13	cd src\graphics\msdos
14	wmake -h -f makefile.wat HOME=..\..\..
15	@echo Building filesys driver
16	cd src\filesys\msdos
17	wmake -h -f makefile.wat HOME=..\..\..
18	cd ..\..\..
19	@echo Building sound driver
20	cd src\sound\dummy
21	wmake -h -f makefile.wat HOME=..\..\..
22	cd ..\..\..
23
24clean: .symbolic
25	@if exist *.bak @del *.bak
26	@if exist bin\*.exe @del bin\*.exe
27	@echo Cleaning core
28	cd src\core
29	wmake -h -f makefile.wat clean HOME=..\..
30	@echo Cleaning msdos code
31	cd src\graphics\msdos
32	wmake -h -f makefile.wat clean HOME=..\..\..
33	@echo Cleaning sound driver
34	cd src\sound\dummy
35	wmake -h -f makefile.wat clean HOME=..\..\..
36	cd ..\..\..
37	@echo Cleaning filegsys
38	cd src\filesys\msdos
39	wmake -h -f makefile.wat clean HOME=..\..\..
40	cd ..\..\..
41	@echo Cleaning Libs
42	cd lib
43	@del *.lib
44	cd ..
45
46sarien: .symbolic
47	@echo Creating binary
48	%create test.lnk
49	%append test.lnk system $(sys)
50	%append test.lnk $(lflags)
51	%append test.lnk name bin\sarien.exe
52	%append test.lnk library lib\agi_core.lib
53	%append test.lnk library lib\driver.lib
54	%append test.lnk library lib\sound.lib
55	%append test.lnk library lib\fileglob.lib
56	%append test.lnk file src\core\main.obj
57	wlink @test.lnk
58
59.error: .symbolic
60	@echo.
61	@echo An Error Occured
62	@if exist test.lnk @del test.lnk
63
64.after: .symbolic
65	@if exist test.lnk @del test.lnk
66
67tarball: .symbolic
68	wmake -h -f makefile.wat clean
69	cd ..
70	tar cvfz sarien-$(VERSION).tar.gz sarien-$(VERSION)
71