drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / payloads / libpayload / curses / PDCurses / os2 / gccos2.mak
blobcaf8021f5a3e0f6fc17e6d11451c232ed4d5b557
1 # GNU MAKE Makefile for PDCurses library - OS/2 emx 0.9c+
3 # Usage: make -f [path\]gccos2.mak [DEBUG=Y] [EMXVIDEO=Y] [DLL=Y] [target]
5 # where target can be any of:
6 # [all|demos|pdcurses.a|testcurs.exe...]
8 # The EMXVIDEO option compiles with the emx video library, which
9 # enables a PDCurses program to run under OS/2 and DOS.
11 O = o
13 ifndef PDCURSES_SRCDIR
14 PDCURSES_SRCDIR = ..
15 endif
17 include $(PDCURSES_SRCDIR)/version.mif
18 include $(PDCURSES_SRCDIR)/libobjs.mif
20 osdir = $(PDCURSES_SRCDIR)/os2
22 PDCURSES_OS2_H = $(osdir)/pdcos2.h
24 CC = gcc
26 CFLAGS = -I$(PDCURSES_SRCDIR) -c -Wall
28 ifeq ($(EMXVIDEO),Y)
29 CFLAGS += -DEMXVIDEO
30 CCLIBS = -lvideo
31 BINDFLAGS = -acm
32 else
33 CCLIBS =
34 BINDFLAGS =
35 endif
37 ifeq ($(DEBUG),Y)
38 CFLAGS += -g -DPDCDEBUG
39 LDFLAGS = -g
40 else
41 CFLAGS += -O2
42 LDFLAGS =
43 endif
45 BASEDEF = $(PDCURSES_SRCDIR)\exp-base.def
47 DEFDEPS = $(BASEDEF)
49 DEFFILE = pdcurses.def
51 DLLTARGET = pdcurses.dll
52 DLLFLAGS = -Zdll -Zcrtdll -Zomf
54 LINK = gcc
55 EMXBIND = emxbind
56 EMXOMF = emxomf
58 LIBEXE = ar
59 LIBFLAGS = rcv
61 ifeq ($(DLL),Y)
62 CFLAGS += -Zdll -Zcrtdll -Zomf
63 LDFLAGS += -Zlinker /PM:VIO -Zomf -Zcrtdll
64 LIBCURSES = pdcurses.lib
65 LIBDEPS = $(LIBOBJS) $(PDCOBJS) $(DEFFILE)
66 PDCLIBS = $(DLLTARGET)
67 EXEPOST =
68 TUIPOST =
69 CLEAN = *.dll *.lib $(DEFFILE)
70 else
71 LIBCURSES = pdcurses.a
72 LIBDEPS = $(LIBOBJS) $(PDCOBJS)
73 PDCLIBS = $(LIBCURSES)
74 EXEPOST = $(EMXBIND) $* $(BINDFLAGS)
75 TUIPOST = $(EMXBIND) tuidemo $(BINDFLAGS)
76 CLEAN = *.a testcurs newdemo xmas tuidemo firework ptest rain worm
77 endif
79 .PHONY: all libs clean demos dist
81 all: libs demos
83 libs: $(PDCLIBS)
85 clean:
86 -del *.o
87 -del *.exe
88 -del $(CLEAN)
90 demos: $(DEMOS)
92 DEMOOBJS = testcurs.o newdemo.o xmas.o tui.o tuidemo.o firework.o \
93 ptest.o rain.o worm.o
95 $(DEFFILE) : $(DEFDEPS)
96 echo LIBRARY PDCURSES > $@
97 echo DESCRIPTION 'PDCurses 3.4 Dynamic Linking library' >> $@
98 echo PROTMODE >>$@
99 echo DATA MULTIPLE READWRITE LOADONCALL >> $@
100 echo CODE LOADONCALL >> $@
101 echo EXPORTS >> $@
102 type $(BASEDEF) >> $@
104 $(LIBCURSES) : $(LIBDEPS)
105 $(LIBEXE) $(LIBFLAGS) $@ $?
106 -copy $(LIBCURSES) panel.a
108 $(DLLTARGET) : $(LIBDEPS)
109 $(LINK) $(DLLFLAGS) -o $(DLLTARGET) $? $(DEFFILE)
110 # lxlite $(DLLTARGET)
111 emximp -o $(LIBCURSES) $(DEFFILE)
113 $(LIBOBJS) $(PDCOBJS) $(DEMOOBJS) : $(PDCURSES_HEADERS)
114 $(PDCOBJS) : $(PDCURSES_OS2_H)
115 $(DEMOS) : $(LIBCURSES)
116 panel.o ptest.o: $(PANEL_HEADER)
117 terminfo.o: $(TERM_HEADER)
119 $(LIBOBJS) : %.o: $(srcdir)/%.c
120 $(CC) -c $(CFLAGS) -o$@ $<
122 $(PDCOBJS) : %.o: $(osdir)/%.c
123 $(CC) -c $(CFLAGS) -o$@ $<
125 firework.exe newdemo.exe rain.exe testcurs.exe worm.exe xmas.exe \
126 ptest.exe: %.exe: %.o
127 $(LINK) $(LDFLAGS) -o $* $< $(LIBCURSES) $(CCLIBS)
128 $(EXEPOST)
130 tuidemo.exe: tuidemo.o tui.o
131 $(LINK) $(LDFLAGS) -o tuidemo tuidemo.o tui.o $(LIBCURSES) $(CCLIBS)
132 $(TUIPOST)
134 firework.o newdemo.o ptest.o rain.o testcurs.o worm.o xmas.o: %.o: \
135 $(demodir)/%.c
136 $(CC) $(CFLAGS) -o$@ $<
138 tui.o: $(demodir)\tui.c $(demodir)\tui.h
139 $(CC) $(CFLAGS) -I$(demodir) -o $@ $<
141 tuidemo.o: $(demodir)\tuidemo.c
142 $(CC) $(CFLAGS) -I$(demodir) -o $@ $<
144 PLATFORM1 = EMX OS/2
145 PLATFORM2 = EMX 0.9d for OS/2
146 ARCNAME = pdc$(VER)_emx_os2
148 include $(PDCURSES_SRCDIR)/makedist.mif