1 # Makefile for PDCurses library for SDL
9 include $(PDCURSES_SRCDIR)/libobjs.mif
11 osdir = $(PDCURSES_SRCDIR)/sdl1
13 PDCURSES_SDL_H = $(osdir)/pdcsdl.h
16 CFLAGS = -g -Wall -DPDCDEBUG
22 BUILD = $(CC) $(CFLAGS) -I$(PDCURSES_SRCDIR)
23 LDFLAGS = -mwindows $(LIBCURSES)
25 BASEDEF = $(PDCURSES_SRCDIR)\exp-base.def
29 DEFFILE = pdcurses.def
32 BUILD += -DPDC_DLL_BUILD
33 LIBEXE = gcc $(DEFFILE)
34 LIBFLAGS = -Wl,--out-implib,libpdcurses.a -shared -o
35 LIBCURSES = pdcurses.dll
36 CLEAN = $(LIBCURSES) *.a $(DEFFILE)
41 LIBCURSES = libpdcurses.a
48 .PHONY: all libs clean demos
55 -del *.o $(CLEAN) *.exe
60 pdcurses.dll: $(DEFFILE)
62 $(DEFFILE): $(DEFDEPS)
63 echo LIBRARY pdcurses > $@
70 echo pdc_sheight >> $@
72 echo pdc_yoffset >> $@
73 echo pdc_xoffset >> $@
75 $(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
76 $(LIBEXE) $(LIBFLAGS) $@ $? $(POST)
78 $(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS)
79 $(PDCOBJS) : $(PDCURSES_SDL_H)
80 $(DEMOS) : $(PDCURSES_CURSES_H) $(LIBCURSES)
81 tui.o tuidemo.o : $(PDCURSES_CURSES_H)
82 terminfo.o: $(TERM_HEADER)
83 panel.o ptest.exe: $(PANEL_HEADER)
85 $(LIBOBJS) : %.o: $(srcdir)/%.c
88 $(PDCOBJS) : %.o: $(osdir)/%.c
91 firework.exe newdemo.exe rain.exe testcurs.exe worm.exe xmas.exe \
92 ptest.exe: %.exe: $(demodir)/%.c
93 $(BUILD) -o $@ $< $(LDFLAGS)
95 tuidemo.exe: tuidemo.o tui.o
96 $(CC) -o $@ tuidemo.o tui.o $(LDFLAGS)
98 tui.o: $(demodir)/tui.c $(demodir)/tui.h
101 tuidemo.o: $(demodir)/tuidemo.c $(demodir)/tui.h
104 sdltest.exe: $(osdir)/sdltest.c
105 $(BUILD) -o $@ $< -mwindows $(LIBCURSES) -lmingw32 -lSDLmain -lSDL