Skip to content

build system: windows support + stylua style checker #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix mkdir issue
  • Loading branch information
Conni2461 committed Jun 16, 2021
commit e1f108a6dfe8266eb1e18cede318a0d284e90aee
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ CFLAGS = -Wall -Werror -fpic
COVERAGE ?=

ifeq ($(OS),Windows_NT)
RM = cmd //C rmdir //Q //S
MKD = -mkdir
RM = cmd /C rmdir /Q /S
CC = gcc
TARGET := libfzf.dll
else
MKD = mkdir -p
RM = rm -rf
TARGET := libfzf.so
endif

all: build/$(TARGET)

build/$(TARGET): src/fzf.c src/fzf.h
@mkdir -p build
$(MKD) build
$(CC) -O3 $(CFLAGS) -shared src/fzf.c -o build/$(TARGET)

build/test: build/$(TARGET) test/test.c
Expand All @@ -31,7 +33,7 @@ format:
stylua --color always -c --glob "**/*.lua" -- lua

debug:
@mkdir -p build
$(MKD) build
$(CC) -Og -ggdb3 $(CFLAGS) $(COVERAGE) -shared src/fzf.c -o build/$(TARGET)

test: build/test
Expand Down