1 # Makefile for Virtual Jaguar
4 # (C) 2011 Underground Software
6 # Note that we control the version information here--uncomment only one set of
7 # echo's from the "prepare" recipe. :-)
13 OSTYPE := $(shell uname -a)
15 # Should catch both 'darwin' and 'darwin7.0'
16 ifeq "$(findstring Darwin,$(OSTYPE))" "Darwin"
17 QMAKE_EXTRA := -spec macx-g++
21 all: prepare virtualjaguar
22 @echo -e "\033[01;33m***\033[00;32m Success!\033[00m"
25 @echo -e "\033[01;33m***\033[00;32m Preparing to compile Virtual Jaguar...\033[00m"
26 @echo "#define VJ_RELEASE_VERSION \"v2.0.0\"" > src/version.h
27 @echo "#define VJ_RELEASE_SUBVERSION \"Final\"" >> src/version.h
28 # @echo "#define VJ_RELEASE_VERSION \"SVN `svn info | grep -i revision`\"" > src/version.h
29 # @echo "#define VJ_RELEASE_SUBVERSION \"2.0.0 Prerelease\"" >> src/version.h
31 virtualjaguar: sources libs makefile-qt
32 @echo -e "\033[01;33m***\033[00;32m Making Virtual Jaguar GUI...\033[00m"
33 $(MAKE) -f makefile-qt
35 makefile-qt: virtualjaguar.pro
36 @echo -e "\033[01;33m***\033[00;32m Creating Qt makefile...\033[00m"
37 qmake $(QMAKE_EXTRA) virtualjaguar.pro -o makefile-qt
39 libs: obj/libmusashi.a obj/libjaguarcore.a
40 @echo -e "\033[01;33m***\033[00;32m Libraries successfully made.\033[00m"
42 obj/libmusashi.a: musashi.mak sources
43 @echo -e "\033[01;33m***\033[00;32m Making Musashi...\033[00m"
44 $(MAKE) -f musashi.mak
46 obj/libjaguarcore.a: jaguarcore.mak sources
47 @echo -e "\033[01;33m***\033[00;32m Making Virtual Jaguar core...\033[00m"
48 $(MAKE) -f jaguarcore.mak
50 sources: src/*.h src/*.cpp src/*.c
53 @echo -ne "\033[01;33m***\033[00;32m Cleaning out the garbage...\033[00m"
56 @-rm -rf virtualjaguar
57 @-$(FIND) . -name "*~" -exec rm -f {} \;
61 @echo -n "Lines in source files: "
62 @-$(FIND) ./src -name "*.cpp" | xargs cat | wc -l
63 @echo -n "Lines in header files: "
64 @-$(FIND) ./src -name "*.h" | xargs cat | wc -l