Skip to content

Commit

Permalink
Use -flto for all tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Mar 15, 2022
1 parent 91fa3dd commit 1ba73f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: all clean

CC := gcc
CFLAGS := -O3 -std=c11 -Wall -Wextra -pedantic -Wno-missing-field-initializers
CFLAGS := -O3 -flto -std=c11 -Wall -Wextra -pedantic -Wno-missing-field-initializers

tools := \
bpp2png \
Expand All @@ -27,11 +27,10 @@ pokemon_animation_graphics: common.h
scan_includes: common.h
stadium: common.h

bpp2png: CFLAGS += -flto
bpp2png: bpp2png.c lodepng/lodepng.c common.h lodepng/lodepng.h
$(CC) $(CFLAGS) -o $@ bpp2png.c lodepng/lodepng.c

lzcomp: CFLAGS += -flto -Wno-strict-overflow -Wno-sign-compare
lzcomp: CFLAGS += -Wno-strict-overflow -Wno-sign-compare
lzcomp: $(wildcard lz/*.c) $(wildcard lz/*.h)
$(CC) $(CFLAGS) -o $@ lz/*.c

Expand Down
2 changes: 2 additions & 0 deletions tools/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdnoreturn.h>
#include <inttypes.h>
#include <string.h>
#include <errno.h>
Expand Down

0 comments on commit 1ba73f2

Please sign in to comment.