fix header file to be more platform-independent
This commit is contained in:
8
makefile
8
makefile
@@ -1,6 +1,6 @@
|
|||||||
CC := x86_64-linux-gnu-gcc
|
CC ?= cc
|
||||||
CFLAGS := -Wall -Wextra -Wpedantic -O2 -std=gnu17
|
CFLAGS += -Wall -Wextra -Wpedantic -O2 -MD -MP -std=gnu99
|
||||||
LDFLAGS :=
|
LDFLAGS +=
|
||||||
|
|
||||||
SRC = $(shell find src/ -name '*.c')
|
SRC = $(shell find src/ -name '*.c')
|
||||||
OBJ := $(patsubst src/%,obj/%,$(SRC:.c=.o))
|
OBJ := $(patsubst src/%,obj/%,$(SRC:.c=.o))
|
||||||
@@ -18,7 +18,7 @@ $(BIN): $(OBJ)
|
|||||||
# compile .o files (w/ .d files)
|
# compile .o files (w/ .d files)
|
||||||
obj/%.o: src/%.c
|
obj/%.o: src/%.c
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
$(CC) -c -MD -MP $(CFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
ifneq ($(shell which bear),)
|
ifneq ($(shell which bear),)
|
||||||
compile_commands.json: makefile
|
compile_commands.json: makefile
|
||||||
|
|||||||
Reference in New Issue
Block a user