coreboot-kgpe-d16/payloads/libpayload/curses/PDCurses-3.4/dos/gccdos.mak
Patrick Georgi 3b77b723ca libpayload: Add PDCurses and ncurses' libform/libmenu
PDCurses provides an alternative implementation of the curses library
standard in addition to tinycurses.
Where tinycurses is really tiny, PDCurses is more complete and provides
virtually unlimited windows and the full API.
The PDCurses code is brought in "vanilla", with all local changes
residing in curses/pdcurses-backend/

In addition to a curses library, this change also provides libpanel (as
part of the PDCurses code), and libform and libmenu which were derived
from ncurses-5.9.
As they rely on ncurses internals (and PDCurses is not ncurses), more
changes were required for these libraries to work.

The build system is extended to install the right set of header files
depending on the selected curses implementation.

Change-Id: I9e5b920f94b6510da01da2f656196a993170d1c5
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/106
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marcj303@gmail.com>
2011-08-04 08:10:41 +02:00

87 lines
1.7 KiB
Makefile

# GNU MAKE (3.79.1) Makefile for PDCurses library - DOS DJGPP V2.0+
#
# Usage: make -f [path\]gccdos.mak [DEBUG=Y] [target]
#
# where target can be any of:
# [all|libs|demos|dist|pdcurses.a|testcurs.exe...]
O = o
ifndef PDCURSES_SRCDIR
PDCURSES_SRCDIR = ..
endif
include $(PDCURSES_SRCDIR)/version.mif
include $(PDCURSES_SRCDIR)/libobjs.mif
osdir = $(PDCURSES_SRCDIR)/dos
PDCURSES_DOS_H = $(osdir)/pdcdos.h
CC = gcc
ifeq ($(DEBUG),Y)
CFLAGS = -g -Wall -DPDCDEBUG
LDFLAGS = -g
else
CFLAGS = -O2 -Wall
LDFLAGS =
endif
CFLAGS += -I$(PDCURSES_SRCDIR)
LINK = gcc
LIBEXE = ar
LIBFLAGS = rcv
LIBCURSES = pdcurses.a
.PHONY: all libs clean demos dist
all: libs demos
libs: $(LIBCURSES)
clean:
-del *.o
-del *.a
-del *.exe
demos: $(DEMOS)
strip *.exe
$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
$(LIBEXE) $(LIBFLAGS) $@ $?
-copy $(LIBCURSES) panel.a
$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
$(PDCOBJS) : $(PDCURSES_DOS_H)
$(DEMOS) : $(PDCURSES_CURSES_H) $(LIBCURSES)
panel.o : $(PANEL_HEADER)
terminfo.o: $(TERM_HEADER)
$(LIBOBJS) : %.o: $(srcdir)/%.c
$(CC) -c $(CFLAGS) $<
$(PDCOBJS) : %.o: $(osdir)/%.c
$(CC) -c $(CFLAGS) $<
firework.exe newdemo.exe rain.exe testcurs.exe worm.exe xmas.exe \
ptest.exe: %.exe: $(demodir)/%.c
$(CC) $(CFLAGS) -o$@ $< $(LIBCURSES)
tuidemo.exe: tuidemo.o tui.o
$(LINK) $(LDFLAGS) -o$@ tuidemo.o tui.o $(LIBCURSES)
tui.o: $(demodir)/tui.c $(demodir)/tui.h $(PDCURSES_CURSES_H)
$(CC) -c $(CFLAGS) -I$(demodir) -o$@ $<
tuidemo.o: $(demodir)/tuidemo.c $(PDCURSES_CURSES_H)
$(CC) -c $(CFLAGS) -I$(demodir) -o$@ $<
PLATFORM1 = DJGPP 2.03
PLATFORM2 = DJGPP 2.03 for DOS
ARCNAME = pdc$(VER)djg
include $(PDCURSES_SRCDIR)/makedist.mif