Makefile 3 KB
Newer Older
1 2 3 4 5 6 7
# Set the value of $(MSVCDir) for your installation. 
# Please note that none of the directory names are allowed to have spaces 
# in them. You must use the short name 
#
# "C:\Program Files\Microsoft Visual Studio\VC98" will not work.
# "C:\Progra~1\Micros~1\VC98" will work.
# MSVCDir="C:\PROGRA~1\MICROS~1.NET\Vc7"
8

9
MSVCDir="C:\PROGRA~1\Micros~3\VC98"
10

11 12
CPP=cl.exe
LINK32=link.exe
13

14 15
LIBOGG_PATH="..\..\xiph.org\ogg\win32\Dynamic_Release"
INCOGG_PATH="..\..\xiph.org\ogg\include"
16

17
LINK32_FLAGS=$(LIBOGG_PATH)\ogg.lib /nologo /dll /incremental:no /libpath:"$(MSVCDir)\Lib" /implib:".\liboggz.lib" /machine:I386 /out:".\liboggz.dll" 
18

19
PROG_LINK_FLAGS=/nologo /incremental:no /libpath:"$(MSVCDir)\Lib" /machine:I386 /exetype:dynamic
20

21
CFLAGS=/nologo /MD /W1 /GX /O2 /I"." /I"..\src\liboggz" /I"..\include" /I$(INCOGG_PATH) /I"$(MSVCDir)\Include"  /D "WIN32" /D "_USRDLL" /YX /FD
22 23


24 25
#====================================================================
# Targets
26

27
ALL :  "attgetopt.obj" "liboggz.dll" "oggzdump.exe" "oggzinfo.exe" "oggzed.exe"
28

29 30 31 32 33 34
CLEAN:
	-@erase ".\*.obj"
	-@erase ".\vc60.idb"
	-@erase ".\liboggz.dll"
	-@erase ".\liboggz.exp"
	-@erase ".\liboggz.lib"
35

36
#====================================================================
37

38 39 40 41 42 43 44 45
LINK32_OBJS= \
	".\oggz.obj" \
	".\oggz_io.obj" \
	".\oggz_read.obj" \
	".\oggz_write.obj" \
	".\oggz_auto.obj" \
	".\oggz_table.obj" \
	".\oggz_vector.obj"
46

47 48
"liboggz.dll" : $(LINK32_OBJS) ".\liboggz.def"
    $(LINK32) $(LINK32_FLAGS) /def:".\liboggz.def" $(LINK32_OBJS)
49

50 51 52
"oggzdump.exe" : "..\src\tools\oggzdump.c"
	$(CPP) $(CFLAGS) /Fo".\oggzdump.obj" /c "..\src\tools\oggzdump.c"
	$(LINK32) $(PROG_LINK_FLAGS) /out:"oggzdump.exe" ".\oggzdump.obj" ".\attgetopt.obj" liboggz.lib
53

54 55 56
"oggzinfo.exe" : "..\src\tools\oggzinfo.c"
	$(CPP) $(CFLAGS) /Fo".\oggzinfo.obj" /c "..\src\tools\oggzinfo.c"
	$(LINK32) $(PROG_LINK_FLAGS) /out:"oggzinfo.exe" ".\oggzinfo.obj" ".\attgetopt.obj" liboggz.lib
57

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
"oggzed.exe" : "..\src\tools\oggzed.c"
	$(CPP) $(CFLAGS) /Fo".\oggzed.obj" /c "..\src\tools\oggzed.c"
	$(LINK32) $(PROG_LINK_FLAGS) /out:"oggzed.exe" ".\oggzed.obj" ".\attgetopt.obj" liboggz.lib

#====================================================================
# C files in src

.\oggz.obj:
	$(CPP) $(CFLAGS) /Fo".\oggz.obj" /c "..\src\liboggz\oggz.c"

.\oggz_io.obj:
	$(CPP) $(CFLAGS) /Fo".\oggz_io.obj" /c "..\src\liboggz\oggz_io.c"

.\oggz_read.obj:
	$(CPP) $(CFLAGS) /Fo".\oggz_read.obj" /c "..\src\liboggz\oggz_read.c"

.\oggz_write.obj:
	$(CPP) $(CFLAGS) /Fo".\oggz_write.obj" /c "..\src\liboggz\oggz_write.c"

.\oggz_auto.obj:
	$(CPP) $(CFLAGS) /Fo".\oggz_auto.obj" /c "..\src\liboggz\oggz_auto.c"

.\oggz_table.obj:
	$(CPP) $(CFLAGS) /Fo".\oggz_table.obj" /c "..\src\liboggz\oggz_table.c"

.\oggz_vector.obj:
	$(CPP) $(CFLAGS) /Fo".\oggz_vector.obj" /c "..\src\liboggz\oggz_vector.c"

.\attgetopt.obj:
	$(CPP) $(CFLAGS) /Fo".\attgetopt.obj" /c ".\attgetopt.c"

# End of Makefile
#====================================================================
91