soc/intel/xeon_sp/util: Enhance lock_pam0123
[coreboot2.git] / payloads / libpayload / curses / PDCurses / sdl1 / Makefile
bloba8393f0b90097f95671d2e3e488eb29a078705a6
1 # Makefile for PDCurses library for SDL
3 O = o
5 ifndef PDCURSES_SRCDIR
6 PDCURSES_SRCDIR = ..
7 endif
9 include $(PDCURSES_SRCDIR)/libobjs.mif
11 osdir = $(PDCURSES_SRCDIR)/sdl1
13 PDCURSES_SDL_H = $(osdir)/pdcsdl.h
15 SFLAGS = $(shell sdl-config --cflags)
16 SLIBS = $(shell sdl-config --libs)
18 # If your system doesn't have these, remove the defines here
19 SFLAGS += -DHAVE_VSNPRINTF -DHAVE_VSSCANF
21 ifeq ($(DEBUG),Y)
22 CFLAGS = -g -Wall -DPDCDEBUG
23 else
24 CFLAGS = -O2 -Wall
25 endif
27 BUILD = $(CC) $(CFLAGS) -I$(PDCURSES_SRCDIR)
29 ifeq ($(shell uname),Darwin)
30 DEMOFLAGS = -Dmain=SDL_main
31 endif
33 LINK = $(CC)
34 LDFLAGS = $(LIBCURSES) $(SLIBS)
35 RANLIB = ranlib
36 LIBCURSES = libpdcurses.a
38 DEMOS = firework newdemo ptest rain testcurs tuidemo worm xmas \
39 sdltest
41 .PHONY: all libs clean demos
43 all: libs demos
45 libs: $(LIBCURSES)
47 clean:
48 -rm -rf *.o trace $(LIBCURSES) $(DEMOS)
50 demos: $(DEMOS)
51 strip $(DEMOS)
53 $(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
54 ar rv $@ $?
55 -$(RANLIB) $@
57 $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
58 $(PDCOBJS) : $(PDCURSES_SDL_H)
59 $(DEMOS) : $(PDCURSES_CURSES_H) $(LIBCURSES)
60 tui.o tuidemo.o : $(PDCURSES_CURSES_H)
61 terminfo.o: $(TERM_HEADER)
62 panel.o ptest: $(PANEL_HEADER)
64 $(LIBOBJS) : %.o: $(srcdir)/%.c
65 $(BUILD) $(SFLAGS) -c $<
67 $(PDCOBJS) : %.o: $(osdir)/%.c
68 $(BUILD) $(SFLAGS) -c $<
70 firework: $(demodir)/firework.c
71 $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
73 newdemo: $(demodir)/newdemo.c
74 $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
76 ptest: $(demodir)/ptest.c
77 $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
79 rain: $(demodir)/rain.c
80 $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
82 testcurs: $(demodir)/testcurs.c
83 $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
85 tuidemo: tuidemo.o tui.o
86 $(LINK) tui.o tuidemo.o -o $@ $(LDFLAGS)
88 worm: $(demodir)/worm.c
89 $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
91 xmas: $(demodir)/xmas.c
92 $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
94 sdltest: $(osdir)/sdltest.c
95 $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS)
97 tui.o: $(demodir)/tui.c $(demodir)/tui.h
98 $(BUILD) -c $(DEMOFLAGS) $(demodir)/tui.c
100 tuidemo.o: $(demodir)/tuidemo.c
101 $(BUILD) -c $(DEMOFLAGS) $(demodir)/tuidemo.c