• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# GNU MAKE (3.79.1) Makefile for PDCurses library - DOS DJGPP V2.0+
2#
3# Usage: make -f [path\]gccdos.mak [DEBUG=Y] [target]
4#
5# where target can be any of:
6# [all|libs|demos|dist|pdcurses.a|testcurs.exe...]
7
8O = o
9
10ifndef PDCURSES_SRCDIR
11	PDCURSES_SRCDIR = ..
12endif
13
14include $(PDCURSES_SRCDIR)/version.mif
15include $(PDCURSES_SRCDIR)/libobjs.mif
16
17osdir		= $(PDCURSES_SRCDIR)/dos
18
19PDCURSES_DOS_H	= $(osdir)/pdcdos.h
20
21CC		= gcc
22
23ifeq ($(DEBUG),Y)
24	CFLAGS  = -g -Wall -DPDCDEBUG
25	LDFLAGS = -g
26else
27	CFLAGS  = -O2 -Wall
28	LDFLAGS =
29endif
30
31CFLAGS += -I$(PDCURSES_SRCDIR)
32
33LINK		= gcc
34
35LIBEXE		= ar
36LIBFLAGS	= rcv
37
38LIBCURSES	= pdcurses.a
39
40.PHONY: all libs clean demos dist
41
42all:	libs demos
43
44libs:	$(LIBCURSES)
45
46clean:
47	-del *.o
48	-del *.a
49	-del *.exe
50
51demos:	$(DEMOS)
52	strip *.exe
53
54$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
55	$(LIBEXE) $(LIBFLAGS) $@ $?
56	-copy $(LIBCURSES) panel.a
57
58$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
59$(PDCOBJS) : $(PDCURSES_DOS_H)
60$(DEMOS) : $(PDCURSES_CURSES_H) $(LIBCURSES)
61panel.o : $(PANEL_HEADER)
62terminfo.o: $(TERM_HEADER)
63
64$(LIBOBJS) : %.o: $(srcdir)/%.c
65	$(CC) -c $(CFLAGS) $<
66
67$(PDCOBJS) : %.o: $(osdir)/%.c
68	$(CC) -c $(CFLAGS) $<
69
70firework.exe newdemo.exe rain.exe testcurs.exe worm.exe xmas.exe \
71ptest.exe: %.exe: $(demodir)/%.c
72	$(CC) $(CFLAGS) -o$@ $< $(LIBCURSES)
73
74tuidemo.exe: tuidemo.o tui.o
75	$(LINK) $(LDFLAGS) -o$@ tuidemo.o tui.o $(LIBCURSES)
76
77tui.o: $(demodir)/tui.c $(demodir)/tui.h $(PDCURSES_CURSES_H)
78	$(CC) -c $(CFLAGS) -I$(demodir) -o$@ $<
79
80tuidemo.o: $(demodir)/tuidemo.c $(PDCURSES_CURSES_H)
81	$(CC) -c $(CFLAGS) -I$(demodir) -o$@ $<
82
83PLATFORM1 = DJGPP 2.03
84PLATFORM2 = DJGPP 2.03 for DOS
85ARCNAME = pdc$(VER)djg
86
87include $(PDCURSES_SRCDIR)/makedist.mif
88