summaryrefslogtreecommitdiff
path: root/payloads/libpayload/curses/PDCurses/sdl1/Makefile
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-11-10 09:00:41 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-11-11 21:38:48 +0100
commit4f85a1eb76d1e7109bcc60ba6f3262a5654ac61b (patch)
treee996818c6aa6b6f702a6c805c447c20724eff265 /payloads/libpayload/curses/PDCurses/sdl1/Makefile
parent2ea24dabd658b8396e0abf79318a538ef0f3a5b8 (diff)
libpayload: Rename PDCurses-3.4 to PDCurses
Change-Id: If881ec130833c7e7e62caa3d31e350a531f5bc8e Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/12398 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/libpayload/curses/PDCurses/sdl1/Makefile')
-rw-r--r--payloads/libpayload/curses/PDCurses/sdl1/Makefile101
1 files changed, 101 insertions, 0 deletions
diff --git a/payloads/libpayload/curses/PDCurses/sdl1/Makefile b/payloads/libpayload/curses/PDCurses/sdl1/Makefile
new file mode 100644
index 0000000000..a8393f0b90
--- /dev/null
+++ b/payloads/libpayload/curses/PDCurses/sdl1/Makefile
@@ -0,0 +1,101 @@
+# 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
+
+SFLAGS = $(shell sdl-config --cflags)
+SLIBS = $(shell sdl-config --libs)
+
+# If your system doesn't have these, remove the defines here
+SFLAGS += -DHAVE_VSNPRINTF -DHAVE_VSSCANF
+
+ifeq ($(DEBUG),Y)
+ CFLAGS = -g -Wall -DPDCDEBUG
+else
+ CFLAGS = -O2 -Wall
+endif
+
+BUILD = $(CC) $(CFLAGS) -I$(PDCURSES_SRCDIR)
+
+ifeq ($(shell uname),Darwin)
+ DEMOFLAGS = -Dmain=SDL_main
+endif
+
+LINK = $(CC)
+LDFLAGS = $(LIBCURSES) $(SLIBS)
+RANLIB = ranlib
+LIBCURSES = libpdcurses.a
+
+DEMOS = firework newdemo ptest rain testcurs tuidemo worm xmas \
+sdltest
+
+.PHONY: all libs clean demos
+
+all: libs demos
+
+libs: $(LIBCURSES)
+
+clean:
+ -rm -rf *.o trace $(LIBCURSES) $(DEMOS)
+
+demos: $(DEMOS)
+ strip $(DEMOS)
+
+$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
+ ar rv $@ $?
+ -$(RANLIB) $@
+
+$(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: $(PANEL_HEADER)
+
+$(LIBOBJS) : %.o: $(srcdir)/%.c
+ $(BUILD) $(SFLAGS) -c $<
+
+$(PDCOBJS) : %.o: $(osdir)/%.c
+ $(BUILD) $(SFLAGS) -c $<
+
+firework: $(demodir)/firework.c
+ $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
+
+newdemo: $(demodir)/newdemo.c
+ $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
+
+ptest: $(demodir)/ptest.c
+ $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
+
+rain: $(demodir)/rain.c
+ $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
+
+testcurs: $(demodir)/testcurs.c
+ $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
+
+tuidemo: tuidemo.o tui.o
+ $(LINK) tui.o tuidemo.o -o $@ $(LDFLAGS)
+
+worm: $(demodir)/worm.c
+ $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
+
+xmas: $(demodir)/xmas.c
+ $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
+
+sdltest: $(osdir)/sdltest.c
+ $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
+
+tui.o: $(demodir)/tui.c $(demodir)/tui.h
+ $(BUILD) -c $(DEMOFLAGS) $(demodir)/tui.c
+
+tuidemo.o: $(demodir)/tuidemo.c
+ $(BUILD) -c $(DEMOFLAGS) $(demodir)/tuidemo.c