diff options
author | Gentoo <installgentoo@endianness.com> | 2021-01-06 21:45:09 +1100 |
---|---|---|
committer | Gentoo <installgentoo@endianness.com> | 2021-01-06 21:45:09 +1100 |
commit | c7def3172977a8d128ff9882d67e604e480f3499 (patch) | |
tree | 43e0202544ac268462bc6b0ac5228512167a71db /Makefile | |
parent | ba38b130577b92c33a6ef34fec829b38cd647212 (diff) | |
download | nyancat-c7def3172977a8d128ff9882d67e604e480f3499.tar.gz nyancat-c7def3172977a8d128ff9882d67e604e480f3499.tar.bz2 nyancat-c7def3172977a8d128ff9882d67e604e480f3499.zip |
+ported to SDL2 +split cat and rainbow draw calls and functions +/- split cat and rainbow images +/- made rainbows drift off screen +spritesheets are now used instead of individual images +"fixed" indentation +replaced old argument code with getopt +added argument that lets you spawn N cats +/- made scaling work (poor results but no longer crashes) +added option to make cat follow sine wave -removed multi screen code (SDL2 fullscreen only works with one screen)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 10 insertions, 17 deletions
@@ -1,24 +1,17 @@ +CC = gcc RES = /usr/share/nyancat BIN = /usr/bin/nyancat -LIBS = -lSDL -lSDL_image -lSDL_mixer -lX11 -FLAGS = -pedantic -Wall -O2 -std=gnu99 -INCS = -I. -I/usr/include ${XINERAMAINC} +LIBS = -lSDL2 -lSDL2_image -lSDL2_mixer -lm +CFLAGS = -O3 -march=native -flto -Wall +OBJ = nyan.o +HEADERS = list.h draw.h globals.h -XINERAMAINC = -I/usr/X11R6/include -XINERAMALIBS = -L/usr/X11R6/lib -lXinerama -XINERAMAFLAGS = -DXINERAMA -nyancat: nyan.c list.h - cc -g nyan.c -o nyancat ${LIBS} ${XINERAMALIBS} ${XINERAMAINC} ${FLAGS} ${XINERAMAFLAGS} +%.o: %.c $(HEADERS) + $(CC) -c -o $@ $< $(CFLAGS) $(LIBS) -install: - cp nyancat ${BIN} - mkdir --parents ${RES} - cp -rv res/* ${RES} +nyancat: $(OBJ) + $(CC) -o $@ $^ $(CFLAGS) $(LIBS) clean: - rm nyancat - -uninstall: - rm ${BIN} - rm -rv ${RES} + rm nyancat $(OBJ) |