| 1 |
SOURCES := aafont.o aafonts.o aavyhen.o aamktabl.o aamem.o aaprintf.o \ |
| 2 |
aahelp.o aaslnkbd.o aafastre.o aalinux.o aalinuxkbd.o aax.o \ |
| 3 |
aaxkbd.o aaxmouse.o fontgl.o font16.o font14.o fontx16.o fontx13.o \ |
| 4 |
fontx13b.o fontcour.o aarec.o font9.o font8.o fontline.o aacurses.o \ |
| 5 |
aacurkbd.o aacurmou.o aalib.o aaflush.o aarender.o aaout.o aain.o \ |
| 6 |
aaedit.o aaregist.o aakbdreg.o aagpm.o aamoureg.o aasave.o aastdout.o \ |
| 7 |
aastdin.o aaparse.o aaimgwidth.o aaimgheight.o aascrwidth.o \ |
| 8 |
aascrheight.o aammwidth.o aammheight.o aaimage.o aatext.o aacurrfnt.o \ |
| 9 |
aaattrs.o aaputpixel.o aarecfunc.o aasdl.o |
| 10 |
|
| 11 |
CFLAGS ?= -O0 -g -fsanitize=address -fsanitize=undefined |
| 12 |
SDL_CFLAGS ?= $(shell sdl2-config --cflags 2>/dev/null || echo "") |
| 13 |
SDL_LIBS ?= $(shell sdl2-config --libs 2>/dev/null || echo "") |
| 14 |
|
| 15 |
all: $(SOURCES) |
| 16 |
${AR} -r libaa.a $(SOURCES) |
| 17 |
|
| 18 |
.c.o: |
| 19 |
$(CC) \ |
| 20 |
$(CFLAGS) \ |
| 21 |
-c $< -o $@ |
| 22 |
|
| 23 |
aasdl.o: aasdl.c |
| 24 |
$(CC) \ |
| 25 |
$(CFLAGS) $(SDL_CFLAGS) \ |
| 26 |
-c $< -o $@ \ |
| 27 |
-DSDL_DRIVER |
| 28 |
|
| 29 |
aax.o: aax.c |
| 30 |
$(CC) \ |
| 31 |
$(CFLAGS) \ |
| 32 |
-c $< -o $@ \ |
| 33 |
-DX11_DRIVER |
| 34 |
|
| 35 |
aacurses.o: aacurses.c |
| 36 |
$(CC) \ |
| 37 |
$(CFLAGS) \ |
| 38 |
-c $< -o $@ \ |
| 39 |
-DCURSES_DRIVER |
| 40 |
|
| 41 |
aaslang.o: aaslang.c |
| 42 |
$(CC) \ |
| 43 |
$(CFLAGS) \ |
| 44 |
-c $< -o $@ \ |
| 45 |
-DSLANG_DRIVER |
| 46 |
|
| 47 |
aaregist.o: aaregist.c |
| 48 |
$(CC) \ |
| 49 |
$(CFLAGS) \ |
| 50 |
-c $< -o $@ \ |
| 51 |
-DSDL_DRIVER -DX11_DRIVER -DCURSES_DRIVER |
| 52 |
|
| 53 |
clean: |
| 54 |
rm -f *.o *.a |