Fix compilation on Windows and enable LTO

This commit is contained in:
Ada Gottensträter 2022-03-29 19:20:21 +02:00
parent 77f7331974
commit 332ba1da89
1 changed files with 3 additions and 1 deletions

View File

@ -26,9 +26,11 @@ SOURCES = spinsim.c spininterp.c spindebug.c pasmsim.c pasmdebug.c pasmsim2.c pa
ifneq ($(MSYSTEM),MINGW32)
ifneq ($(OS),msys)
ifneq ($(OS),Windows_NT)
SOURCES += conion.c
endif
endif
endif
OBJECTS = $(patsubst %,$(BUILD)/%, $(SOURCES:.c=.o))
@ -36,7 +38,7 @@ OBJECTS = $(patsubst %,$(BUILD)/%, $(SOURCES:.c=.o))
# commented them out for the time being
#LDFLAGS = -Wl,--relax -Wl,--gc-sections
LDFLAGS = -lm
OPT := -O3
OPT := -O3 -flto -fno-fat-lto-objects
CFLAGS = -c -g -Wall -Wno-format $(OPT) -D LINUX
all: directory $(SOURCES) $(OBJECTS) Makefile