Patrick Georgi | 3b77b72 | 2011-07-07 15:41:53 +0200 | [diff] [blame] | 1 | # NMAKE Makefile for PDCurses library - OS/2 C Set/2 |
| 2 | # |
| 3 | # Usage: nmake -f [path\]iccos2.mak [DEBUG=] [target] |
| 4 | # |
| 5 | # where target can be any of: |
| 6 | # [all|demos|pdcurses.lib|testcurs.exe...] |
| 7 | |
| 8 | O = obj |
| 9 | |
| 10 | !ifndef PDCURSES_SRCDIR |
| 11 | PDCURSES_SRCDIR = .. |
| 12 | !endif |
| 13 | |
| 14 | !include $(PDCURSES_SRCDIR)\version.mif |
| 15 | !include $(PDCURSES_SRCDIR)\libobjs.mif |
| 16 | |
| 17 | osdir = $(PDCURSES_SRCDIR)\os2 |
| 18 | |
| 19 | PDCURSES_OS2_H = $(osdir)\pdcos2.h |
| 20 | |
| 21 | CC = icc |
| 22 | |
| 23 | !ifdef DEBUG |
| 24 | CFLAGS = /Sm /Ti+ /O- /Q+ /dPDCDEBUG |
| 25 | LDFLAGS = /NOLOGO /NOE /SE:160 /DEBUG /PMTYPE:VIO |
| 26 | !else |
| 27 | CFLAGS = /Sm /Ti- /O+ /Q+ |
| 28 | LDFLAGS = /NOLOGO /NOE /EXEPACK /PACKCODE /PACKDATA /PMTYPE:VIO |
| 29 | !endif |
| 30 | |
| 31 | CPPFLAGS = -I$(PDCURSES_SRCDIR) |
| 32 | |
| 33 | BUILD = $(CC) -c $(CFLAGS) $(CPPFLAGS) |
| 34 | |
| 35 | LINK = link386 |
| 36 | |
| 37 | LIBEXE = lib |
| 38 | |
| 39 | LIBCURSES = pdcurses.lib |
| 40 | |
| 41 | all: $(LIBCURSES) $(DEMOS) |
| 42 | |
| 43 | clean: |
| 44 | -del *.obj |
| 45 | -del *.lib |
| 46 | -del *.exe |
| 47 | |
| 48 | demos: $(DEMOS) |
| 49 | |
| 50 | $(LIBCURSES) : $(LIBOBJS) $(PDCOBJS) |
| 51 | $(LIBEXE) $@ @$(osdir)\iccos2.lrf |
| 52 | -copy $(LIBCURSES) panel.lib |
| 53 | |
| 54 | addch.obj: $(srcdir)\addch.c $(PDCURSES_HEADERS) |
| 55 | $(BUILD) $(srcdir)\addch.c |
| 56 | |
| 57 | addchstr.obj: $(srcdir)\addchstr.c $(PDCURSES_HEADERS) |
| 58 | $(BUILD) $(srcdir)\addchstr.c |
| 59 | |
| 60 | addstr.obj: $(srcdir)\addstr.c $(PDCURSES_HEADERS) |
| 61 | $(BUILD) $(srcdir)\addstr.c |
| 62 | |
| 63 | attr.obj: $(srcdir)\attr.c $(PDCURSES_HEADERS) |
| 64 | $(BUILD) $(srcdir)\attr.c |
| 65 | |
| 66 | beep.obj: $(srcdir)\beep.c $(PDCURSES_HEADERS) |
| 67 | $(BUILD) $(srcdir)\beep.c |
| 68 | |
| 69 | bkgd.obj: $(srcdir)\bkgd.c $(PDCURSES_HEADERS) |
| 70 | $(BUILD) $(srcdir)\bkgd.c |
| 71 | |
| 72 | border.obj: $(srcdir)\border.c $(PDCURSES_HEADERS) |
| 73 | $(BUILD) $(srcdir)\border.c |
| 74 | |
| 75 | clear.obj: $(srcdir)\clear.c $(PDCURSES_HEADERS) |
| 76 | $(BUILD) $(srcdir)\clear.c |
| 77 | |
| 78 | color.obj: $(srcdir)\color.c $(PDCURSES_HEADERS) |
| 79 | $(BUILD) $(srcdir)\color.c |
| 80 | |
| 81 | delch.obj: $(srcdir)\delch.c $(PDCURSES_HEADERS) |
| 82 | $(BUILD) $(srcdir)\delch.c |
| 83 | |
| 84 | deleteln.obj: $(srcdir)\deleteln.c $(PDCURSES_HEADERS) |
| 85 | $(BUILD) $(srcdir)\deleteln.c |
| 86 | |
| 87 | deprec.obj: $(srcdir)\deprec.c $(PDCURSES_HEADERS) |
| 88 | $(BUILD) $(srcdir)\deprec.c |
| 89 | |
| 90 | getch.obj: $(srcdir)\getch.c $(PDCURSES_HEADERS) |
| 91 | $(BUILD) $(srcdir)\getch.c |
| 92 | |
| 93 | getstr.obj: $(srcdir)\getstr.c $(PDCURSES_HEADERS) |
| 94 | $(BUILD) $(srcdir)\getstr.c |
| 95 | |
| 96 | getyx.obj: $(srcdir)\getyx.c $(PDCURSES_HEADERS) |
| 97 | $(BUILD) $(srcdir)\getyx.c |
| 98 | |
| 99 | inch.obj: $(srcdir)\inch.c $(PDCURSES_HEADERS) |
| 100 | $(BUILD) $(srcdir)\inch.c |
| 101 | |
| 102 | inchstr.obj: $(srcdir)\inchstr.c $(PDCURSES_HEADERS) |
| 103 | $(BUILD) $(srcdir)\inchstr.c |
| 104 | |
| 105 | initscr.obj: $(srcdir)\initscr.c $(PDCURSES_HEADERS) |
| 106 | $(BUILD) $(srcdir)\initscr.c |
| 107 | |
| 108 | inopts.obj: $(srcdir)\inopts.c $(PDCURSES_HEADERS) |
| 109 | $(BUILD) $(srcdir)\inopts.c |
| 110 | |
| 111 | insch.obj: $(srcdir)\insch.c $(PDCURSES_HEADERS) |
| 112 | $(BUILD) $(srcdir)\insch.c |
| 113 | |
| 114 | insstr.obj: $(srcdir)\insstr.c $(PDCURSES_HEADERS) |
| 115 | $(BUILD) $(srcdir)\insstr.c |
| 116 | |
| 117 | instr.obj: $(srcdir)\instr.c $(PDCURSES_HEADERS) |
| 118 | $(BUILD) $(srcdir)\instr.c |
| 119 | |
| 120 | kernel.obj: $(srcdir)\kernel.c $(PDCURSES_HEADERS) |
| 121 | $(BUILD) $(srcdir)\kernel.c |
| 122 | |
| 123 | keyname.obj: $(srcdir)\keyname.c $(PDCURSES_HEADERS) |
| 124 | $(BUILD) $(srcdir)\keyname.c |
| 125 | |
| 126 | mouse.obj: $(srcdir)\mouse.c $(PDCURSES_HEADERS) |
| 127 | $(BUILD) $(srcdir)\mouse.c |
| 128 | |
| 129 | move.obj: $(srcdir)\move.c $(PDCURSES_HEADERS) |
| 130 | $(BUILD) $(srcdir)\move.c |
| 131 | |
| 132 | outopts.obj: $(srcdir)\outopts.c $(PDCURSES_HEADERS) |
| 133 | $(BUILD) $(srcdir)\outopts.c |
| 134 | |
| 135 | overlay.obj: $(srcdir)\overlay.c $(PDCURSES_HEADERS) |
| 136 | $(BUILD) $(srcdir)\overlay.c |
| 137 | |
| 138 | pad.obj: $(srcdir)\pad.c $(PDCURSES_HEADERS) |
| 139 | $(BUILD) $(srcdir)\pad.c |
| 140 | |
| 141 | panel.obj: $(srcdir)\panel.c $(PDCURSES_HEADERS) $(PANEL_HEADER) |
| 142 | $(BUILD) $(srcdir)\panel.c |
| 143 | |
| 144 | printw.obj: $(srcdir)\printw.c $(PDCURSES_HEADERS) |
| 145 | $(BUILD) $(srcdir)\printw.c |
| 146 | |
| 147 | refresh.obj: $(srcdir)\refresh.c $(PDCURSES_HEADERS) |
| 148 | $(BUILD) $(srcdir)\refresh.c |
| 149 | |
| 150 | scanw.obj: $(srcdir)\scanw.c $(PDCURSES_HEADERS) |
| 151 | $(BUILD) $(srcdir)\scanw.c |
| 152 | |
| 153 | scr_dump.obj: $(srcdir)\scr_dump.c $(PDCURSES_HEADERS) |
| 154 | $(BUILD) $(srcdir)\scr_dump.c |
| 155 | |
| 156 | scroll.obj: $(srcdir)\scroll.c $(PDCURSES_HEADERS) |
| 157 | $(BUILD) $(srcdir)\scroll.c |
| 158 | |
| 159 | slk.obj: $(srcdir)\slk.c $(PDCURSES_HEADERS) |
| 160 | $(BUILD) $(srcdir)\slk.c |
| 161 | |
| 162 | termattr.obj: $(srcdir)\termattr.c $(PDCURSES_HEADERS) |
| 163 | $(BUILD) $(srcdir)\termattr.c |
| 164 | |
| 165 | terminfo.obj: $(srcdir)\terminfo.c $(PDCURSES_HEADERS) $(TERM_HEADER) |
| 166 | $(BUILD) $(srcdir)\terminfo.c |
| 167 | |
| 168 | touch.obj: $(srcdir)\touch.c $(PDCURSES_HEADERS) |
| 169 | $(BUILD) $(srcdir)\touch.c |
| 170 | |
| 171 | util.obj: $(srcdir)\util.c $(PDCURSES_HEADERS) |
| 172 | $(BUILD) $(srcdir)\util.c |
| 173 | |
| 174 | window.obj: $(srcdir)\window.c $(PDCURSES_HEADERS) |
| 175 | $(BUILD) $(srcdir)\window.c |
| 176 | |
| 177 | debug.obj: $(srcdir)\debug.c $(PDCURSES_HEADERS) |
| 178 | $(BUILD) $(srcdir)\debug.c |
| 179 | |
| 180 | pdcclip.obj: $(osdir)\pdcclip.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H) |
| 181 | $(BUILD) $(osdir)\pdcclip.c |
| 182 | |
| 183 | pdcdisp.obj: $(osdir)\pdcdisp.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H) |
| 184 | $(BUILD) $(osdir)\pdcdisp.c |
| 185 | |
| 186 | pdcgetsc.obj: $(osdir)\pdcgetsc.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H) |
| 187 | $(BUILD) $(osdir)\pdcgetsc.c |
| 188 | |
| 189 | pdckbd.obj: $(osdir)\pdckbd.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H) |
| 190 | $(BUILD) $(osdir)\pdckbd.c |
| 191 | |
| 192 | pdcscrn.obj: $(osdir)\pdcscrn.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H) |
| 193 | $(BUILD) $(osdir)\pdcscrn.c |
| 194 | |
| 195 | pdcsetsc.obj: $(osdir)\pdcsetsc.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H) |
| 196 | $(BUILD) $(osdir)\pdcsetsc.c |
| 197 | |
| 198 | pdcutil.obj: $(osdir)\pdcutil.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H) |
| 199 | $(BUILD) $(osdir)\pdcutil.c |
| 200 | |
| 201 | firework.exe: firework.obj $(LIBCURSES) |
| 202 | $(LINK) $(LDFLAGS) $*.obj,$*,,$(LIBCURSES); |
| 203 | |
| 204 | newdemo.exe: newdemo.obj $(LIBCURSES) |
| 205 | $(LINK) $(LDFLAGS) $*.obj,$*,,$(LIBCURSES); |
| 206 | |
| 207 | ptest.exe: ptest.obj $(LIBCURSES) |
| 208 | $(LINK) $(LDFLAGS) $*.obj,$*,,$(LIBCURSES); |
| 209 | |
| 210 | rain.exe: rain.obj $(LIBCURSES) |
| 211 | $(LINK) $(LDFLAGS) $*.obj,$*,,$(LIBCURSES); |
| 212 | |
| 213 | testcurs.exe: testcurs.obj $(LIBCURSES) |
| 214 | $(LINK) $(LDFLAGS) $*.obj,$*,,$(LIBCURSES); |
| 215 | |
| 216 | tuidemo.exe: tuidemo.obj tui.obj $(LIBCURSES) |
| 217 | $(LINK) $(LDFLAGS) $*.obj+tui.obj,$*,,$(LIBCURSES); |
| 218 | |
| 219 | worm.exe: worm.obj $(LIBCURSES) |
| 220 | $(LINK) $(LDFLAGS) $*.obj,$*,,$(LIBCURSES); |
| 221 | |
| 222 | xmas.exe: xmas.obj $(LIBCURSES) |
| 223 | $(LINK) $(LDFLAGS) $*.obj,$*,,$(LIBCURSES); |
| 224 | |
| 225 | firework.obj: $(demodir)\firework.c $(PDCURSES_CURSES_H) |
| 226 | $(BUILD) $(demodir)\firework.c |
| 227 | |
| 228 | newdemo.obj: $(demodir)\newdemo.c $(PDCURSES_CURSES_H) |
| 229 | $(BUILD) $(demodir)\newdemo.c |
| 230 | |
| 231 | ptest.obj: $(demodir)\ptest.c $(PANEL_HEADER) $(PDCURSES_CURSES_H) |
| 232 | $(BUILD) $(demodir)\ptest.c |
| 233 | |
| 234 | rain.obj: $(demodir)\rain.c $(PDCURSES_CURSES_H) |
| 235 | $(BUILD) $(demodir)\rain.c |
| 236 | |
| 237 | testcurs.obj: $(demodir)\testcurs.c $(PDCURSES_CURSES_H) |
| 238 | $(BUILD) $(demodir)\testcurs.c |
| 239 | |
| 240 | tui.obj: $(demodir)\tui.c $(demodir)\tui.h $(PDCURSES_CURSES_H) |
| 241 | $(BUILD) $(demodir)\tui.c |
| 242 | |
| 243 | tuidemo.obj: $(demodir)\tuidemo.c $(PDCURSES_CURSES_H) |
| 244 | $(BUILD) $(demodir)\tuidemo.c |
| 245 | |
| 246 | worm.obj: $(demodir)\worm.c $(PDCURSES_CURSES_H) |
| 247 | $(BUILD) $(demodir)\worm.c |
| 248 | |
| 249 | xmas.obj: $(demodir)\xmas.c $(PDCURSES_CURSES_H) |
| 250 | $(BUILD) $(demodir)\xmas.c |
| 251 | |
| 252 | PLATFORM1 = C Set/2 OS/2 |
| 253 | PLATFORM2 = C Set/2 for OS/2 |
| 254 | ARCNAME = pdc$(VER)_icc_os2 |
| 255 | |
| 256 | !include $(PDCURSES_SRCDIR)\makedist.mif |