Skip to content

Commit 95d9c6c

Browse files
authored
Merge pull request #1 from Rax-x/refactor/moving-to-stb-style
Refactor/moving to stb style
2 parents f5d24d1 + 598ee0b commit 95d9c6c

File tree

5 files changed

+503
-356
lines changed

5 files changed

+503
-356
lines changed

Makefile

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,11 @@ CFLAGS = -g -Wall -Wextra -Werror
33

44
TEST_SRC = test/test.c
55
SRC = $(wildcard *.c)
6-
OBJ = $(patsubst %.c, %.o, $(SRC))
76

8-
LIB_STATIC_NAME = libstring_view.a
9-
10-
ifeq ($(OS),Windows_NT)
11-
LIB_DYNAMIC_NAME = libstring_view.dll
12-
else
13-
LIB_DYNAMIC_NAME = libstring_view.so
14-
endif
15-
16-
.PHONY: test clean
17-
18-
build-static: $(SRC)
19-
$(CC) $(CFLAGS) -c $?
20-
ar r $(LIB_STATIC_NAME) $(OBJ)
21-
@rm -rf $(OBJ)
22-
23-
build-dynamic: $(SRC)
24-
$(CC) $(CFLAGS) -c -fPIC $(SRC)
25-
$(CC) $(CFLAGS) -shared -o $(LIB_DYNAMIC_NAME) $(OBJ)
26-
@rm -rf $(OBJ)
7+
.PHONY: test
278

289
test: $(TEST_SRC) $(SRC)
2910
$(info "Run tests...")
3011
@$(CC) $(CFLAGS) -o test/$@ $?
3112
@./test/test
3213
@rm -rf ./test/test
33-
34-
clean:
35-
-rm -rf $(LIB_STATIC_NAME) $(LIB_DYNAMIC_NAME)

string_view.c

Lines changed: 0 additions & 170 deletions
This file was deleted.

0 commit comments

Comments
 (0)