aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/makefile
blob: 425f9d8438a055445fc3bf3241674a7e11a6f706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
MHMAKESLNFILE=mhmake.sln

.PHONY: all mhmake_dbg mhmake cleanthis

all: debug\mhmake_dbg.exe release\mhmake.exe

DEPS=$(wildcard src\*)

ifneq $(which devenv.com),
VCSTUDIO_DBG=devenv.com $(MHMAKESLNFILE) /build Debug
VCSTUDIO_REL=devenv.com $(MHMAKESLNFILE) /build Release
endif
ifneq $(which vcbuild.exe),
VCSTUDIO_DBG=vcbuild $(MHMAKESLNFILE) "Debug|Win32"
VCSTUDIO_REL=vcbuild $(MHMAKESLNFILE) "Release|Win32"
endif

ifndef VCSTUDIO_DBG
$(error Environment not set correctly for building Visual Studio projects)
endif

debug\mhmake_dbg.exe: $(DEPS)
	$(VCSTUDIO_DBG) 

release\mhmake.exe: $(DEPS)
	$(VCSTUDIO_REL) 

clean: cleanthis

cleanthis:
	del -e Debug
	del -e Release