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.
13 ifndef PDCURSES_SRCDIR
17 include $(PDCURSES_SRCDIR
)/version.mif
18 include $(PDCURSES_SRCDIR
)/libobjs.mif
20 osdir
= $(PDCURSES_SRCDIR
)/os2
22 PDCURSES_OS2_H
= $(osdir
)/pdcos2.h
26 CFLAGS
= -I
$(PDCURSES_SRCDIR
) -c
-Wall
38 CFLAGS
+= -g
-DPDCDEBUG
45 BASEDEF
= $(PDCURSES_SRCDIR
)\exp-base.def
49 DEFFILE
= pdcurses.def
51 DLLTARGET
= pdcurses.dll
52 DLLFLAGS
= -Zdll
-Zcrtdll
-Zomf
62 CFLAGS
+= -Zdll
-Zcrtdll
-Zomf
63 LDFLAGS
+= -Zlinker
/PM
:VIO
-Zomf
-Zcrtdll
64 LIBCURSES
= pdcurses.lib
65 LIBDEPS
= $(LIBOBJS
) $(PDCOBJS
) $(DEFFILE
)
66 PDCLIBS
= $(DLLTARGET
)
69 CLEAN
= *.dll
*.lib
$(DEFFILE
)
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
79 .PHONY
: all libs
clean demos
dist
92 DEMOOBJS
= testcurs.o newdemo.o xmas.o tui.o tuidemo.o firework.o \
95 $(DEFFILE
) : $(DEFDEPS
)
96 echo LIBRARY PDCURSES
> $@
97 echo DESCRIPTION
'PDCurses 3.4 Dynamic Linking library' >> $@
99 echo DATA MULTIPLE READWRITE LOADONCALL
>> $@
100 echo CODE LOADONCALL
>> $@
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
)
130 tuidemo.exe
: tuidemo.o tui.o
131 $(LINK
) $(LDFLAGS
) -o tuidemo tuidemo.o tui.o
$(LIBCURSES
) $(CCLIBS
)
134 firework.o newdemo.o ptest.o rain.o testcurs.o worm.o xmas.o
: %.o
: \
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
$@
$<
145 PLATFORM2
= EMX
0.9d for OS
/2
146 ARCNAME
= pdc
$(VER
)_emx_os2
148 include $(PDCURSES_SRCDIR
)/makedist.mif