2022-01-15 17:34:32 +00:00
|
|
|
EXEC_PREFIX ?= $(PREFIX)
|
|
|
|
BINDIR ?= $(EXEC_PREFIX)/bin
|
|
|
|
|
2022-01-15 15:21:30 +00:00
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .inc .txt
|
|
|
|
|
2022-01-15 17:30:00 +00:00
|
|
|
NAME = switcher
|
2022-01-15 17:27:23 +00:00
|
|
|
TILES = player_stand_tile.inc \
|
|
|
|
player_walk1_tile.inc player_walk1_tile_reversed.inc \
|
|
|
|
player_walk2_tile.inc player_walk2_tile_reversed.inc \
|
|
|
|
grass_tile.inc dirt_tile.inc flag_tile.inc \
|
2022-01-15 16:52:16 +00:00
|
|
|
switch1_off_tile.inc switch1_on_tile.inc \
|
|
|
|
tile1_off_tile.inc tile1_on_tile.inc \
|
2022-01-16 14:38:47 +00:00
|
|
|
stage1_tile.inc stage2_tile.inc stage3_tile.inc stage4_tile.inc \
|
|
|
|
stage5_tile.inc stage6_tile.inc stage7_tile.inc stage8_tile.inc \
|
|
|
|
star_tile.inc \
|
2022-01-16 14:26:29 +00:00
|
|
|
rebind_rebind1_tile.inc rebind_rebind2_tile.inc rebind_rebind3_tile.inc \
|
|
|
|
rebind_left1_tile.inc rebind_left2_tile.inc \
|
|
|
|
rebind_right1_tile.inc rebind_right2_tile.inc \
|
|
|
|
rebind_jump1_tile.inc rebind_jump2_tile.inc \
|
|
|
|
rebind_rebind1_alt_tile.inc
|
2022-01-14 14:03:24 +00:00
|
|
|
|
|
|
|
all: $(NAME)
|
|
|
|
|
2022-01-15 15:21:30 +00:00
|
|
|
$(NAME): $(NAME).c $(TILES)
|
2022-01-14 14:03:24 +00:00
|
|
|
$(CC) -O3 -Wall -Wextra -Werror -pedantic -o $@ $< -ldisplay
|
|
|
|
|
2022-01-15 15:21:30 +00:00
|
|
|
.txt.inc:
|
|
|
|
./tile_compiler.py $< > $@
|
|
|
|
|
2022-01-15 17:27:23 +00:00
|
|
|
player_walk1_tile_reversed.inc: player_walk1_tile.txt
|
|
|
|
./tile_compiler.py $< reversed > $@
|
|
|
|
|
|
|
|
player_walk2_tile_reversed.inc: player_walk2_tile.txt
|
|
|
|
./tile_compiler.py $< reversed > $@
|
|
|
|
|
2022-01-14 14:03:24 +00:00
|
|
|
run: $(NAME)
|
|
|
|
./$(NAME)
|
|
|
|
|
|
|
|
clean:
|
2022-01-15 15:21:30 +00:00
|
|
|
rm -f $(NAME) $(TILES)
|
2022-01-14 14:03:24 +00:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
|
2022-01-15 17:34:32 +00:00
|
|
|
install: $(NAME)
|
|
|
|
mkdir -p $(DESTDIR)$(BINDIR)
|
|
|
|
install $(NAME) $(DESTDIR)$(BINDIR)/$(NAME)
|
|
|
|
|
|
|
|
.PHONY: all clean distclean install
|