1#
2# Toplevel Makefile for DJGPP v2
3#
4# $Id: Makefile.dj,v 1.6 2001/08/25 01:58:46 almightyjustin Exp $
5#
6
7TOPDIR=.
8include $(TOPDIR)/Rules.dj
9
10all: core drivers sarien
11
12core:
13	@echo Building core engine
14	cd src\core
15	make -f Makefile.dj TOPDIR=../..
16	cd ..\..
17
18drivers:
19	@echo Building graphics driver
20	cd src\graphics\msdos
21	make -f Makefile.dj TOPDIR=../../..
22	cd ..\..\..
23	@echo Building filesys driver
24	cd src\filesys\msdos
25	make -f Makefile.dj TOPDIR=../../..
26	cd ..\..\..
27	@echo Building sound driver
28	cd src\sound\dummy
29	make -f Makefile.dj TOPDIR=../../..
30	cd ..\..\..
31
32clean:
33	if exist *.bak @del *.bak
34	if exist bin\*.exe @del bin\*.exe
35	echo Cleaning core
36	cd src\core
37	make -f Makefile.dj clean TOPDIR=../..
38	cd ..\..
39	echo Cleaning msdos code
40	cd src\graphics\msdos
41	make -f Makefile.dj clean TOPDIR=../../..
42	cd ..\..\..
43	echo Cleaning sound driver
44	cd src\sound\dummy
45	make -f Makefile.dj clean TOPDIR=../../..
46	cd ..\..\..
47	echo Cleaning filesys
48	cd src\filesys\msdos
49	make -f Makefile.dj clean TOPDIR=../../..
50	cd ..\..\..
51
52sarien:
53	@echo Creating binary
54	gcc -O2 src/core/agi_core.a \
55		src/graphics/msdos/driver.a \
56		src/sound/dummy/sound.a \
57		src/filesys/msdos/fileglob.a \
58		-lalleg -o bin/sarien.exe
59
60tarball:
61	make -f Makefile.dj clean
62	cd ..
63	tar cvfz sarien-$(VERSION).tar.gz sarien-$(VERSION)
64
65