Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save minism/b2bf50112b5c0cef1d3d64cf8f0da52f to your computer and use it in GitHub Desktop.
Save minism/b2bf50112b5c0cef1d3d64cf8f0da52f to your computer and use it in GitHub Desktop.
SRCS=$(wildcard *.c)
OUTDIR=dist
TARGET=$(OUTDIR)/app
all: $(TARGET) $(TARGET).exe
clean:
rm -f $(OUTDIR)
$(OUTDIR):
mkdir -p $@
$(TARGET): $(SRCS) | $(OUTDIR)
clang $< -o $@
$(TARGET).exe: $(SRCS) | $(OUTDIR)
docker run --rm -it -v `pwd`:/mnt mmozeiko/mingw-w64 /usr/local/bin/x86_64-w64-mingw32-gcc $< -o $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment