-
Notifications
You must be signed in to change notification settings - Fork 49
/
Makefile.win
129 lines (112 loc) · 4.07 KB
/
Makefile.win
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Makefile for Win32
ECHO = REM
#!if defined(WOA)
!ifdef WOA
NV_DDK_VER = nt8
NV_DDK_SUBVER = 7880
NV_DDK_DIR = $(NV_TOOLS)\ddk\$(NV_DDK_VER)\$(NV_DDK_SUBVER)
PATH = $(NV_DDK_DIR)\bin\x86\arm;$(PATH)
INCLUDE = $(NV_DDK_DIR)\Include\um;$(NV_DDK_DIR)\Include\um\crt\stl160;$(NV_DDK_DIR)\Include\shared;$(NV_DDK_DIR)\Include\KM;$(NV_DDK_DIR)\inc\crt
LIB = $(NV_DDK_DIR)\Lib\win8\um\arm;$(NV_DDK_DIR)\Lib\Crt\arm
!endif
# defines
SUBDIRS = lib.dir test.dir progs.dir win32install.dir
CLEAN = $(SUBDIRS:.dir=.clean)
CLOBBER = $(SUBDIRS:.dir=.clobber)
# default rule
default : $(SUBDIRS)
# cleanup rules
clean : $(CLEAN)
clobber : $(CLOBBER)
RM = -rm -rf
TCSH = c:\bin\tcsh
FIND = c:\bin\find
TCSH_FIND = c:/bin/find
DIST_NAME = glut-3.8
ZIP = zip
ZIP_NAME = glut38
ZIP_DATA_NAME = glutdata
FIX_FILES = ../util/dos2unix/FixFiles
DIST = README NOTICE README.glut2 README.fortran README.xinput \
README.inventor README.irix64bit CHANGES Imakefile Makefile.sgi \
mkmkfiles.win \
mkmkfiles.imake mkmkfiles.sgi Glut.cf lib test progs man \
README.ibm-shlib README.irix6 FAQ.glut README.glut3 README.linux \
README.man Makefile IAFA-PACKAGE README.mesa README.ada \
include adainclude glutdefs README.win README.mui \
glutmake.bat glutwin32.mak Makefile.win Portability.txt
tree_clobber:
nmake /f Makefile.win clobber
$(RM) disttest $(DIST_NAME) glut.stage1.tar
$(FIND) . -name '*.bak' -print | xargs /bin/rm -f
$(FIND) . -name '*.obj' -print | xargs /bin/rm -f
$(FIND) . -name '*.exe' -print | xargs /bin/rm -f
$(FIND) . -name '*.swp' -print | xargs /bin/rm -f
$(FIND) . -name 'deleted' -print | xargs /bin/rm -f
DATA_DIST = $(DIST_NAME)/data $(DIST_NAME)/progs/advanced97/data $(DIST_NAME)/progs/advanced97/flame $(DIST_NAME)/progs/advanced97/skull
tar:
cd util\dos2unix
nmake /f Makefile.win
cd ..\..
$(RM) disttest $(DIST_NAME) glut.stage1.tar glut.tar.gz glut_data.tar.gz
-tar cvf glut.stage1.tar -X DistExclude $(DIST) data
$(RM) $(DIST_NAME)
mkdir $(DIST_NAME)
cd $(DIST_NAME)
tar xvmf ../glut.stage1.tar
nmake /f Makefile.win tree_clobber
$(RM) progs/advanced97/skull/skull3d.tiff progs/examples/mjkimage.c
$(TCSH) -c "$(TCSH_FIND) . -name 'README' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(FIX_FILES) progs/*/*.c++ mkfiles/*"
$(TCSH) -c "$(FIX_FILES) README.* CHANGES NOTICE Glut.cf IAFA-PACKAGE glutdefs Portability.txt mkmkfiles.sgi mkmkfiles.imake"
chmod 755 mkmkfiles.sgi mkmkfiles.imake
$(TCSH) -c "$(TCSH_FIND) . -name '*.c' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(TCSH_FIND) . -name '*.f' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(TCSH_FIND) . -name '*.h' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(TCSH_FIND) . -name '*.man' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(TCSH_FIND) . -name '*.ads' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(TCSH_FIND) . -name '*.adb' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(TCSH_FIND) . -name '*.object' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(TCSH_FIND) . -name 'Makefile.sgi' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(TCSH_FIND) . -name 'Imakefile' -print | xargs $(FIX_FILES)"
$(TCSH) -c "$(TCSH_FIND) . -name 'ObjectType.mk' -print | xargs $(FIX_FILES)"
cd ..
tar cvf glut_data.tar $(DATA_DIST)
$(ZIP) -r $(ZIP_NAME)data.zip $(DATA_DIST)
$(RM) $(DATA_DIST)
tar cvf glut.tar $(DIST_NAME)
$(ZIP) -r $(ZIP_NAME).zip $(DIST_NAME)
$(RM) $(DIST_NAME) glut.stage1.tar
gzip -fv glut.tar
gzip -fv glut_data.tar
testdist:
$(RM) disttest
mkdir disttest
cd disttest
cp ../glut.tar.gz .
gunzip glut.tar.gz
tar xvmf glut.tar
cd $(DIST_NAME)
# ./mkmkfiles.win
nmake /f Makefile.win
cd test
nmake /f Makefile.win test
cd ../../..
$(RM) disttest
# inference rules
$(SUBDIRS) :
$(ECHO) Making in $* subdirectory...
@cd $*
@nmake -f Makefile.win -nologo
@cd ..
$(CLEAN) :
@del *~
$(ECHO) Cleaning in $* subdirectory...
@cd $*
@nmake -f Makefile.win -nologo clean
@cd ..
$(CLOBBER) :
$(ECHO) Clobbering in $* subdirectory...
@cd $*
@nmake -f Makefile.win -nologo clobber
@cd ..