Skip to content

Commit

Permalink
Update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbid authored Jan 13, 2023
1 parent 0d722c6 commit f7bc857
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions TuxPusher_SDL/makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
CC ?= cc
INCLUDE_HEADERS = -I ../inc
LINK_DEPS = -lSDL2 -lGLESv2 -lEGL -lm
CFLAGS ?= -Ofast
PREFIX ?= $(DESTDIR)

ifneq ($(LDFLAGS),)
LINK_DEPS += $(LDFLAGS)
endif

.PHONY: all

all: tuxpusher

tuxpusher:
cc main.c -I ../inc -lSDL2 -lGLESv2 -lEGL -Ofast -lm -o tuxpusher
tuxpusher: tuxpusher.o
$(CC) $(CFLAGS) $(LDFLAGS) main.o \
$(INCLUDE_HEADERS) $(LINK_DEPS) \
-o tuxpusher

tuxpusher.o: main.c
$(CC) $(CFLAGS) $(LDFLAGS) -c main.c \
$(INCLUDE_HEADERS) $(LINK_DEPS)

install:
install -Dm 0755 tuxpusher -t $(PREFIX)/bin
install -Dm 0755 tuxpusher -t $(PREFIX)

uninstall:
rm $(DESTDIR)/tuxpusher

clean:
rm -f tuxpusher
rm -f *.o tuxpusher

0 comments on commit f7bc857

Please sign in to comment.