drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / payloads / libpayload / curses / PDCurses / win32 / vcwin32.mak
blobb8dc4043b7682db6dc701e1ffdbefd67816a8b1f
1 # Visual C++ NMakefile for PDCurses library - Win32 VC++ 2.0+
3 # Usage: nmake -f [path\]vcwin32.mak [DEBUG=] [DLL=] [WIDE=] [UTF8=] [target]
5 # where target can be any of:
6 # [all|demos|pdcurses.lib|testcurs.exe...]
8 O = obj
10 !ifndef PDCURSES_SRCDIR
11 PDCURSES_SRCDIR = ..
12 !endif
14 !include $(PDCURSES_SRCDIR)\version.mif
15 !include $(PDCURSES_SRCDIR)\libobjs.mif
17 osdir = $(PDCURSES_SRCDIR)\win32
19 PDCURSES_WIN_H = $(osdir)\pdcwin.h
21 CC = cl.exe -nologo
23 !ifdef DEBUG
24 CFLAGS = -Z7 -DPDCDEBUG
25 LDFLAGS = -debug -pdb:none
26 !else
27 CFLAGS = -O1
28 LDFLAGS =
29 !endif
31 BASEDEF = $(PDCURSES_SRCDIR)\exp-base.def
32 WIDEDEF = $(PDCURSES_SRCDIR)\exp-wide.def
34 DEFDEPS = $(BASEDEF)
36 !ifdef WIDE
37 WIDEOPT = -DPDC_WIDE
38 DEFDEPS = $(DEFDEPS) $(WIDEDEF)
39 !endif
41 !ifdef UTF8
42 UTF8OPT = -DPDC_FORCE_UTF8
43 !endif
45 DEFFILE = pdcurses.def
46 SHL_LD = link $(LDFLAGS) /NOLOGO /DLL /OUT:pdcurses.dll /DEF:$(DEFFILE)
48 LINK = link.exe -nologo
50 CCLIBS = user32.lib advapi32.lib
51 # may need to add msvcrt.lib for VC 2.x, VC 5.0 doesn't want it
52 #CCLIBS = msvcrt.lib user32.lib advapi32.lib
54 LIBEXE = lib -nologo
56 LIBCURSES = pdcurses.lib
57 CURSESDLL = pdcurses.dll
59 !ifdef DLL
60 DLLOPT = -DPDC_DLL_BUILD
61 PDCLIBS = $(CURSESDLL)
62 !else
63 PDCLIBS = $(LIBCURSES)
64 !endif
66 BUILD = $(CC) -I$(PDCURSES_SRCDIR) -c $(CFLAGS) $(DLLOPT) \
67 $(WIDEOPT) $(UTF8OPT)
69 all: $(PDCLIBS) $(DEMOS)
71 clean:
72 -del *.obj
73 -del *.lib
74 -del *.exe
75 -del *.dll
76 -del *.exp
77 -del *.res
78 -del *.def
80 DEMOOBJS = $(DEMOS:.exe=.obj) tui.obj
82 $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
83 $(PDCOBJS) : $(PDCURSES_WIN_H)
84 $(DEMOOBJS) : $(PDCURSES_CURSES_H)
85 $(DEMOS) : $(LIBCURSES)
86 panel.obj : $(PANEL_HEADER)
87 terminfo.obj: $(TERM_HEADER)
89 !ifndef DLL
90 $(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
91 $(LIBEXE) -out:$@ $(LIBOBJS) $(PDCOBJS)
92 -copy $(LIBCURSES) panel.lib
93 !endif
95 $(DEFFILE) : $(DEFDEPS)
96 echo LIBRARY pdcurses > $(DEFFILE)
97 echo EXPORTS >> $(DEFFILE)
98 type $(BASEDEF) >> $(DEFFILE)
99 !ifdef WIDE
100 type $(WIDEDEF) >> $(DEFFILE)
101 !endif
103 $(CURSESDLL) : $(LIBOBJS) $(PDCOBJS) $(DEFFILE) pdcurses.obj
104 $(SHL_LD) $(LIBOBJS) $(PDCOBJS) pdcurses.obj $(CCLIBS)
105 -copy $(LIBCURSES) panel.lib
107 pdcurses.res pdcurses.obj: $(osdir)\pdcurses.rc $(osdir)\pdcurses.ico
108 rc /r /fopdcurses.res $(osdir)\pdcurses.rc
109 cvtres /MACHINE:IX86 /NOLOGO /OUT:pdcurses.obj pdcurses.res
111 {$(srcdir)\}.c{}.obj::
112 $(BUILD) $<
114 {$(osdir)\}.c{}.obj::
115 $(BUILD) $<
117 {$(demodir)\}.c{}.obj::
118 $(BUILD) $<
120 .obj.exe:
121 $(LINK) $(LDFLAGS) $< $(LIBCURSES) $(CCLIBS)
123 tuidemo.exe: tuidemo.obj tui.obj
124 $(LINK) $(LDFLAGS) $*.obj tui.obj $(LIBCURSES) $(CCLIBS)
126 tui.obj: $(demodir)\tui.c $(demodir)\tui.h
127 $(BUILD) -I$(demodir) $(demodir)\tui.c
129 tuidemo.obj: $(demodir)\tuidemo.c
130 $(BUILD) -I$(demodir) $(demodir)\tuidemo.c
132 PLATFORM1 = Visual C++
133 PLATFORM2 = Microsoft Visual C/C++ for Win32
134 ARCNAME = pdc$(VER)_vc_w32
136 !include $(PDCURSES_SRCDIR)\makedist.mif