Skip to content

Commit

Permalink
Windows is actually ass wtf is this ucrt/msvcrt/wtfcrt bs
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyuria authored and Cyuria committed Jan 27, 2024
1 parent a9c19d2 commit dec872a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@ bin := bin

dirs := $(h) $(lib) $(src) $(build) $(bin)

debug := y
cflags := -std=c17 -Wall
lflags := -L$(lib) -largp-standalone

ifeq ($(strip $(debug)),y)
cflags += -g
else
cflags += -O3
endif

ifeq ($(OS),Windows_NT)
libprefix :=
libext := .lib
opext := .exe
lflags += -Wl,-nodefaultlib:libcmt -D_DLL -lucrt
endif
ifeq ($(OS),Linux)
libprefix := lib
Expand All @@ -32,16 +43,6 @@ endif
argp-standalone-dir := argp-standalone/build/src
argp-standalone := $(libprefix)argp-standalone$(libext)

debug := y
cflags := -std=c17 -Wall
lflags := -L$(lib) -largp-standalone

ifeq ($(strip $(debug)),y)
cflags += -g
else
cflags += -O3
endif

output := $(bin)/wrasm$(opext)
headers := $(wildcard $(h)/*.h)
sources := $(wildcard $(src)/*.c)
Expand Down

0 comments on commit dec872a

Please sign in to comment.