diff options
author | Patrick Georgi <patrick.georgi@secunet.com> | 2011-07-07 15:41:53 +0200 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2011-08-04 08:10:41 +0200 |
commit | 3b77b723ca209199c8a224702812441e2196d452 (patch) | |
tree | cbf3be2c724139ec80a33dbf8e002b7871ef9307 /payloads/libpayload/curses/PDCurses-3.4/sdl1/Makefile.mng | |
parent | 1ac19e28eed4f6c53a4f295eb55500c65fc80f8d (diff) |
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>
Diffstat (limited to 'payloads/libpayload/curses/PDCurses-3.4/sdl1/Makefile.mng')
-rw-r--r-- | payloads/libpayload/curses/PDCurses-3.4/sdl1/Makefile.mng | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/payloads/libpayload/curses/PDCurses-3.4/sdl1/Makefile.mng b/payloads/libpayload/curses/PDCurses-3.4/sdl1/Makefile.mng new file mode 100644 index 0000000000..427edc670b --- /dev/null +++ b/payloads/libpayload/curses/PDCurses-3.4/sdl1/Makefile.mng @@ -0,0 +1,105 @@ +# Makefile for PDCurses library for SDL + +O = o + +ifndef PDCURSES_SRCDIR + PDCURSES_SRCDIR = .. +endif + +include $(PDCURSES_SRCDIR)/libobjs.mif + +osdir = $(PDCURSES_SRCDIR)/sdl1 + +PDCURSES_SDL_H = $(osdir)/pdcsdl.h + +ifeq ($(DEBUG),Y) + CFLAGS = -g -Wall -DPDCDEBUG +else + CFLAGS = -O2 -Wall +endif + +CC = gcc +BUILD = $(CC) $(CFLAGS) -I$(PDCURSES_SRCDIR) +LDFLAGS = -mwindows $(LIBCURSES) + +BASEDEF = $(PDCURSES_SRCDIR)\exp-base.def + +DEFDEPS = $(BASEDEF) + +DEFFILE = pdcurses.def + +ifeq ($(DLL),Y) + BUILD += -DPDC_DLL_BUILD + LIBEXE = gcc $(DEFFILE) + LIBFLAGS = -Wl,--out-implib,libpdcurses.a -shared -o + LIBCURSES = pdcurses.dll + CLEAN = $(LIBCURSES) *.a $(DEFFILE) + POST = -lSDL +else + LIBEXE = ar + LIBFLAGS = rcv + LIBCURSES = libpdcurses.a + CLEAN = *.a + LDFLAGS += -lSDL +endif + +DEMOS += sdltest.exe + +.PHONY: all libs clean demos + +all: libs demos + +libs: $(LIBCURSES) + +clean: + -del *.o $(CLEAN) *.exe + +demos: $(DEMOS) + strip *.exe + +pdcurses.dll: $(DEFFILE) + +$(DEFFILE): $(DEFDEPS) + echo LIBRARY pdcurses > $@ + echo EXPORTS >> $@ + type $(BASEDEF) >> $@ + echo pdc_screen >> $@ + echo pdc_font >> $@ + echo pdc_icon >> $@ + echo pdc_back >> $@ + echo pdc_sheight >> $@ + echo pdc_swidth >> $@ + echo pdc_yoffset >> $@ + echo pdc_xoffset >> $@ + +$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS) + $(LIBEXE) $(LIBFLAGS) $@ $? $(POST) + +$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS) +$(PDCOBJS) : $(PDCURSES_SDL_H) +$(DEMOS) : $(PDCURSES_CURSES_H) $(LIBCURSES) +tui.o tuidemo.o : $(PDCURSES_CURSES_H) +terminfo.o: $(TERM_HEADER) +panel.o ptest.exe: $(PANEL_HEADER) + +$(LIBOBJS) : %.o: $(srcdir)/%.c + $(BUILD) -c $< + +$(PDCOBJS) : %.o: $(osdir)/%.c + $(BUILD) -c $< + +firework.exe newdemo.exe rain.exe testcurs.exe worm.exe xmas.exe \ +ptest.exe: %.exe: $(demodir)/%.c + $(BUILD) -o $@ $< $(LDFLAGS) + +tuidemo.exe: tuidemo.o tui.o + $(CC) -o $@ tuidemo.o tui.o $(LDFLAGS) + +tui.o: $(demodir)/tui.c $(demodir)/tui.h + $(BUILD) -c $< + +tuidemo.o: $(demodir)/tuidemo.c $(demodir)/tui.h + $(BUILD) -c $< + +sdltest.exe: $(osdir)/sdltest.c + $(BUILD) -o $@ $< -mwindows $(LIBCURSES) -lmingw32 -lSDLmain -lSDL |