switcher/Makefile

36 lines
834 B
Makefile
Raw Normal View History

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-15 16:16:42 +00:00
stage1_tile.inc stage2_tile.inc star_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
.PHONY: all clean