OSDN Git Service

replace some header files.
[putex/putex.git] / src / texsourc / makefile
1 # Copyright 2007 TeX Users Group.
2 # Copyright 2014 Clerk Ma.
3 #
4 # You may freely use, modify and/or distribute this file.
5
6 # Makefile for Y&YTeX
7
8 # TO SET UP DEBUGGING INFO:
9 # (1) add -Zi to CFLAGS for CL
10 # (2) add /MAP /DEBUG /PDB:yandytex.pdb for LINK
11
12 # NOTE: full optimization causes some problems especially in TEX5.C & TEX6.C
13 # NOTE: assuming no aliasing causes some problems especially in TEXMF.C
14
15 CC = cl
16 LINK = link
17 RC = rc
18
19 # -Gf saves about 7k bytes in EXE file
20
21 # For production (-Bd show compiler passes)
22 # ASSUMING WE WORK WITH MS COMPILER AND LINKER ONLY use -Gy and -Gf
23 # CFLAGS=-c -DDOS -DMSDOS -DPHARLAP -DTeX -DMYDEBUG -Ilib -Ox -Gy -Gf -W3
24 # CFLAGS=-c -DDOS -DMSDOS -DPHARLAP -DTeX -DMYDEBUG -Ilib -YX -Ox -Ge -Gy -Gf -W4
25 # Release version
26 # CFLAGS=/c /Ge /Gy /Gf /Ox /W4 /DMSDOS /DTeX /DPHARLAP /DNDEBUG /Ilib /YX
27 CFLAGS=/nologo /c /MT /GF /Gy /Ox /W4 /DMSDOS /DTeX /DPHARLAP /DNDEBUG \
28         /I"kpathsea"
29 # /I"libharu/include" /I"libharu/win32/include"
30 # Debugging version
31 # CFLAGS=/c /Ge /Gy /Gf /Od /Zi /W4 /DMSDOS /DTeX /DPHARLAP /Ilib /YX
32
33 # NOTE: -Ox => -Ogityb1 -Gs
34
35 # Link with MS LINK
36 # LFLAGS=@yandytex.nt /MAP lib\libdos.lib
37 # Release version
38 # LFLAGS=/MAP lib\libdos.lib
39 LFLAGS=/MAP
40 # /MACHINE:X86
41 # debugging version
42 # LFLAGS=@yandytex.nt /MAP /DEBUG /PDB:yandytex.pdb lib\libdos.lib
43 # LFLAGS=/MAP /DEBUG /PDB:yandytex.pdb
44
45 objs = texmf.obj itex.obj openinou.obj subroute.obj local.obj \
46         tex0.obj tex1.obj tex2.obj tex3.obj tex4.obj \
47         tex5.obj tex6.obj tex7.obj tex8.obj tex9.obj \
48         yandy_pool.obj yandytex.res md5.obj md5file.obj
49
50 # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
51 # # LIBHARU
52 # lib/libhpdf/libhpdf.lib lib/zlib/zlib.lib
53
54 texmf.exe: $(objs) 
55         $(LINK) $(LFLAGS) texmf itex openinou subroute local \
56         tex0 tex1 tex2 tex3 tex4 tex5 tex6 tex7 tex8 tex9 \
57         yandy_pool yandytex.res md5 md5file kpathsea\kpathsea.lib
58 #       kpathsea\kpathsea.lib libharu\libhpdf.lib libpng\libpng.lib zlib\zlib.lib
59         copy texmf.exe yandytex.exe
60         del ..\yandy\bin\texmf.exe
61         copy texmf.exe ..\yandy\bin\texmf.exe
62 # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
63 md5.obj: libmd5\md5.c
64         $(CC) -Ilibmd5 $(CFLAGS) libmd5\md5.c
65
66 md5file.obj: md5file.c
67         $(CC) -Ilibmd5 $(CFLAGS) md5file.c
68
69 yandytex.res: yandytex.rc
70         rc yandytex.rc
71
72 texmf.obj: texmf.c \
73         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
74         $(CC) /DINITEX /DINI $(CFLAGS) texmf.c
75
76 itex.obj: itex.c \
77         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
78         $(CC) /DINITEX $(CFLAGS) itex.c
79
80 openinou.obj: openinou.c \
81         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
82         $(CC) $(CFLAGS) openinou.c
83
84 subroute.obj: subroute.c \
85         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
86         $(CC) $(CFLAGS) subroute.c      
87
88 local.obj: local.c \
89         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
90         $(CC) /DINITEX $(CFLAGS) local.c
91
92 # NOTE: cannot compile tex5.c and tex6.c with full optimizations ...
93
94 tex0.obj: tex0.c \
95         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
96
97 tex1.obj: tex1.c \
98         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
99
100 tex2.obj: tex2.c \
101         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
102
103 tex3.obj: tex3.c \
104         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
105
106 tex4.obj: tex4.c \
107         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
108
109 tex5.obj: tex5.c \
110         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
111
112 tex6.obj: tex6.c \
113         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
114
115 tex7.obj: tex7.c \
116         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
117
118 tex8.obj: tex8.c \
119         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
120
121 tex9.obj: tex9.c \
122         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
123
124 yandy_pool.obj: yandy_pool.c \
125         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
126
127 .SUFFIXES:
128 .SUFFIXES: .obj .c
129
130 c..obj:
131         $(CC) $(CFLAGS) $*.c
132