Patrick Georgi | 3b77b72 | 2011-07-07 15:41:53 +0200 | [diff] [blame] | 1 | # Borland MAKE Makefile for PDCurses library - DOS BC++ 3.0+ |
| 2 | # |
| 3 | # Usage: make -f [path\]bccdos.mak [DEBUG=] [target] |
| 4 | # |
| 5 | # where target can be any of: |
| 6 | # [all|demos|pdcurses.lib|testcurs.exe...] |
| 7 | |
| 8 | # Change the memory MODEL here, if desired |
| 9 | MODEL = l |
| 10 | |
| 11 | O = obj |
| 12 | |
| 13 | !ifndef PDCURSES_SRCDIR |
| 14 | PDCURSES_SRCDIR = .. |
| 15 | !endif |
| 16 | |
| 17 | !include $(PDCURSES_SRCDIR)\version.mif |
| 18 | !include $(PDCURSES_SRCDIR)\libobjs.mif |
| 19 | |
| 20 | osdir = $(PDCURSES_SRCDIR)\dos |
| 21 | |
| 22 | !ifdef DEBUG |
Stefan Reinauer | 5bbc5e5 | 2015-11-10 09:13:43 -0800 | [diff] [blame] | 23 | CFLAGS = -N -v -y -DPDCDEBUG |
Patrick Georgi | 3b77b72 | 2011-07-07 15:41:53 +0200 | [diff] [blame] | 24 | !else |
Stefan Reinauer | 5bbc5e5 | 2015-11-10 09:13:43 -0800 | [diff] [blame] | 25 | CFLAGS = -O |
Patrick Georgi | 3b77b72 | 2011-07-07 15:41:53 +0200 | [diff] [blame] | 26 | !endif |
| 27 | |
| 28 | CPPFLAGS = -I$(PDCURSES_SRCDIR) |
| 29 | |
| 30 | BUILD = $(CC) -1- -K -G -rd -d -w-eff -w-par -c \ |
| 31 | -m$(MODEL) $(CFLAGS) $(CPPFLAGS) |
| 32 | |
| 33 | LIBEXE = tlib /C /E |
| 34 | |
| 35 | LIBCURSES = pdcurses.lib |
| 36 | |
| 37 | all: $(LIBCURSES) $(DEMOS) |
| 38 | |
| 39 | clean: |
| 40 | -del *.obj |
| 41 | -del *.lib |
| 42 | -del *.map |
| 43 | -del *.exe |
| 44 | |
| 45 | demos: $(DEMOS) |
| 46 | |
| 47 | $(LIBCURSES) : $(LIBOBJS) $(PDCOBJS) |
| 48 | -del $@ |
| 49 | $(LIBEXE) $@ @$(osdir)\bccdos.lrf |
| 50 | -copy $(LIBCURSES) panel.lib |
| 51 | |
| 52 | .autodepend |
| 53 | |
| 54 | {$(srcdir)\}.c.obj: |
| 55 | $(BUILD) $< |
| 56 | |
| 57 | {$(osdir)\}.c.obj: |
| 58 | $(BUILD) $< |
| 59 | |
| 60 | {$(demodir)\}.c.obj: |
| 61 | $(BUILD) $< |
| 62 | |
| 63 | .c.obj: |
| 64 | $(BUILD) $< |
| 65 | |
| 66 | .obj.exe: |
| 67 | $(CC) -m$(MODEL) -e$@ $** $(LIBCURSES) |
| 68 | |
| 69 | tuidemo.exe: tuidemo.obj tui.obj $(LIBCURSES) |
| 70 | $(CC) -m$(MODEL) -e$@ $** |
| 71 | |
| 72 | tui.obj: $(demodir)\tui.c $(demodir)\tui.h $(PDCURSES_CURSES_H) |
| 73 | $(BUILD) -I$(demodir) $(demodir)\tui.c |
| 74 | |
| 75 | tuidemo.obj: $(demodir)\tuidemo.c $(PDCURSES_CURSES_H) |
| 76 | $(BUILD) -I$(demodir) $(demodir)\tuidemo.c |
| 77 | |
| 78 | PLATFORM1 = Borland C++ 3.1 |
| 79 | PLATFORM2 = Borland C/C++ 3.1 for DOS |
| 80 | ARCNAME = pdc$(VER)bcc |
| 81 | |
| 82 | !include $(PDCURSES_SRCDIR)\makedist.mif |