OSDN Git Service

binding with libharu.
[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
17 LINK = link
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 /Gy /Ox /W4 /DMSDOS /DTeX /DPHARLAP /DNDEBUG /Ilib\libhpdf\include
28 # Debugging version
29 # CFLAGS=/c /Ge /Gy /Gf /Od /Zi /W4 /DMSDOS /DTeX /DPHARLAP /Ilib /YX 
30
31 # NOTE: -Ox => -Ogityb1 -Gs
32
33 # Link with MS LINK
34 # LFLAGS=@yandytex.nt /MAP lib\libdos.lib
35 # Release version
36 # LFLAGS=/MAP lib\libdos.lib
37 LFLAGS=/MAP
38 # debugging version
39 # LFLAGS=@yandytex.nt /MAP /DEBUG /PDB:yandytex.pdb lib\libdos.lib
40 # LFLAGS=/MAP /DEBUG /PDB:yandytex.pdb
41
42 objs = texmf.obj itex.obj openinou.obj subroute.obj local.obj \
43         tex0.obj tex1.obj tex2.obj tex3.obj tex4.obj \
44         tex5.obj tex6.obj tex7.obj tex8.obj tex9.obj
45
46 # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
47
48 texmf.exe: $(objs) 
49         $(LINK) /NODEFAULTLIB:msvcr $(LFLAGS) texmf itex openinou subroute local \
50         tex0 tex1 tex2 tex3 tex4 tex5 tex6 tex7 tex8 tex9 lib/libhpdf/libhpdf.lib lib/zlib/zlib.lib
51         copy texmf.exe yandytex.exe
52         del ..\yandy\bin\texmf.exe
53         copy texmf.exe ..\yandy\bin\texmf.exe
54 # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
55
56 texmf.obj: texmf.c \
57         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
58         $(CC) /DINITEX /DINI $(CFLAGS) texmf.c
59
60 itex.obj: itex.c \
61         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
62         $(CC) /DINITEX $(CFLAGS) itex.c
63
64 openinou.obj: openinou.c \
65         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
66         $(CC) $(CFLAGS) openinou.c
67
68 subroute.obj: subroute.c \
69         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
70         $(CC) $(CFLAGS) subroute.c      
71
72 local.obj: local.c \
73         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
74         $(CC) /DINITEX $(CFLAGS) local.c
75
76 # NOTE: cannot compile tex5.c and tex6.c with full optimizations ...
77
78 tex0.obj: tex0.c \
79         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
80
81 tex1.obj: tex1.c \
82         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
83
84 tex2.obj: tex2.c \
85         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
86
87 tex3.obj: tex3.c \
88         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
89
90 tex4.obj: tex4.c \
91         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
92
93 tex5.obj: tex5.c \
94         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
95
96 tex6.obj: tex6.c \
97         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
98
99 tex7.obj: tex7.c \
100         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
101
102 tex8.obj: tex8.c \
103         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
104
105 tex9.obj: tex9.c \
106         texd.h texmf.h texmfmem.h coerce.h lib.h config.h common.h
107
108 .SUFFIXES:
109 .SUFFIXES: .obj .c
110
111 c..obj:
112         $(CC) $(CFLAGS) $*.c
113