]> git.saurik.com Git - wxWidgets.git/blob - src/png/MAKEFILE.VA
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / src / png / MAKEFILE.VA
1 #
2 # File: makefile.vc
3 # Author: David Webster
4 # Created: 1999
5 # Updated:
6 # Copyright:
7 # Licence: wxWindows Licence
8 #
9 # "%W% %G%"
10 #
11 # Makefile : Builds os2png.lib library for OS/2 3.0/4.0
12
13 # Suffixes
14 OBJSUFF=obj
15 SRCSUFF=cpp
16
17 OS2FLAGS=/c /W2 /DOS232 /D__VISAGECPP__ /Ss /Q /N100
18 OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16
19 OS2LIBFLAGS=/NOL /NOE
20 OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
21
22 !if "$(WXMAKINGDLL)" != "0"
23 EXTRADLLFLAGS=/DWXMAKINGDLL=1 /Ge- /D__OS2DLL__
24 EXTRALNKFLAGS=/DLL
25 !endif
26
27 # Change WXDIR or WXWIN to wherever wxWindows is found
28 WXDIR = $(WXWIN)
29
30 OS2PNGDIR=$(WXDIR)\src\png
31 OS2PNGINC=$(WINPNGDIR)
32 OS2PNGLIB=$(WXDIR)\lib\os2png.lib
33 !if "$(WXMAKINGDLL)" != "1"
34 OS2PNGLIB=$(WXDIR)\lib\os2png.lib
35 !else
36 OS2PNGLIB=$(WXDIR)\lib\os2png.dll
37 !endif
38 INC=-I$(WXDIR)\src\zlib -I$(OS2PNGINC)
39
40 !ifndef FINAL
41 FINAL=0
42 !endif
43
44 !if "$(NOPCH)" == "1"
45 PCH=
46 PRECOMP=
47 MAKEPRECOMP=
48 !else
49 PCH=$(WXLIBNAME).pch
50 PRECOMP=/Si$(PCH)
51 MAKEPRECOMP=/Fi$(PCH)
52 !endif
53
54 !if "$(FINAL)" == "0"
55 !if "$(WXMAKINGDLL)" == "1"
56 D=DebugOS2DLL
57 !else
58 D=DebugOS2
59 !endif
60 OPT =
61 DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb
62 LINK_DEBUG_FLAGS=/DEBUG
63 CRTFLAG=/Gm /Gd
64 !else
65 # /O1 - smallest code
66 # /O2 - fastest code
67 !if "$(WXMAKINGDLL)" == "1"
68 D=RelseOS2DLL
69 !else
70 D=RelseOS2
71 !endif
72 OPT = /O+ /Oc /G5
73 DEBUG_FLAGS=
74 LINK_DEBUG_FLAGS=/RELEASE
75 CRTFLAG=/Gm /Gd
76 !endif
77
78 !if [md $(OS2PNGDIR)\$D]
79 !endif
80
81 CPPFLAGS=$(OS2FLAGS) $(EXTRADLLFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG)
82 LINKFKAGS=$(OS2LINKFLAGS) $(EXTRALNKFLAGS)
83 LIBS=..\\..\\lib\os2zlibd.lib
84
85 {..\png}.c{..\png\$D}.obj:
86 @echo $<
87 icc @<<
88 $(CPPFLAGS) /Fo$@ /Tp $<
89 <<
90
91 OBJECTS = \
92 ..\png\$D\png.obj \
93 ..\png\$D\pngread.obj \
94 ..\png\$D\pngrtran.obj \
95 ..\png\$D\pngrutil.obj \
96 ..\png\$D\pngpread.obj \
97 ..\png\$D\pngtrans.obj \
98 ..\png\$D\pngwrite.obj \
99 ..\png\$D\pngwtran.obj \
100 ..\png\$D\pngwutil.obj \
101 ..\png\$D\pngerror.obj \
102 ..\png\$D\pngmem.obj \
103 ..\png\$D\pngwio.obj \
104 ..\png\$D\pngrio.obj \
105 ..\png\$D\pngget.obj \
106 ..\png\$D\pngset.obj
107
108 all: $(OS2PNGLIB)
109
110 !if "$(WXMAKINGDLL)" != "1"
111
112 $(WXDIR)\lib\os2png.lib: $(OBJECTS)
113 touch $(WXDIR)\lib\os2png.lib
114 del $(WXDIR)\lib\os2png.lib
115 ilib $(OS2LIBFLAGS) $@ @<<
116 $**;
117 <<
118
119 !else
120
121 # Update the dynamic link library
122 $(WXDIR)\lib\os2png.dll: $(OBJECTS)
123 icc @<<
124 /B" $(LINKFLAGS)" /Fe$@
125 $(LIBS)
126 $(OBJECTS)
127 $(WXDIR)\src\os2\os2png.def
128 <<
129 implib $(WXDIR)\lib\os2pngd.lib $(WXDIR)\src\os2\os2png.def
130
131 !endif
132
133 clean:
134 del $(OS2PNGLIB)
135 erase /N $(OS2PNGDIR)\$D
136 rd $(OS2PNGDIR)\$D
137
138 cleanall: clean
139