Skip to content

Commit

Permalink
build: fix macos sys include dir
Browse files Browse the repository at this point in the history
  • Loading branch information
exbotanical committed May 8, 2023
1 parent 8d9b75b commit e1bda35
Show file tree
Hide file tree
Showing 20 changed files with 28 additions and 20 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ SRC := $(wildcard $(SRCDIR)/*.c)
DEPS := $(filter-out $(wildcard $(DEPSDIR)/tap.c/*), $(wildcard $(DEPSDIR)/*/*.c))
OBJ := $(addprefix obj/, $(notdir $(SRC:.c=.o)) $(notdir $(DEPS:.c=.o)))

CFLAGS = -I$(LINCDIR) -I$(DEPSDIR) -g -ggdb -fPIC -Wall -Wextra -pedantic -Wnonnull-compare -Wno-missing-braces
CFLAGS = -I$(LINCDIR) -I$(DEPSDIR) -g -ggdb -fPIC -Wall -Wextra -pedantic -Wno-missing-braces
LIBS := -lcrypto -lssl -lm -lpcre -lpthread

PLATFORM := $(shell uname)

ifeq ($(findstring Darwin,$(PLATFORM)),Darwin)
CFLAGS += -I$(INCDIR)
else
CFLAGS += -Wnonnull-compare
endif

all: $(DYNAMIC_TARGET) $(STATIC_TARGET)

$(DYNAMIC_TARGET): $(OBJ)
Expand Down
2 changes: 1 addition & 1 deletion examples/auth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LINK := -lys -luuid -lpcre -lm
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) $(SRC) -o $(TARGET) -I../../src -I../../deps -Ideps -L../../ $(LINK)
$(CC) $(SRC) -o $(TARGET) -I../../src -I../../deps -I../../include -Ideps -L../../ $(LINK)

clean:
rm $(TARGET)
2 changes: 1 addition & 1 deletion examples/auth/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../"
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

./demo
2 changes: 1 addition & 1 deletion examples/config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TARGET := demo
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) -I../../src -I../../deps $(SRC) -o $(TARGET) -L../../ $(LINK)
$(CC) -I../../src -I../../deps -I../../include $(SRC) -o $(TARGET) -L../../ $(LINK)

clean:
rm $(TARGET)
2 changes: 1 addition & 1 deletion examples/config/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../"
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

./demo
2 changes: 1 addition & 1 deletion examples/cors/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TARGET := demo
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) -I../../src -I../../deps $(SRC) -o $(TARGET) -L../../ $(LINK)
$(CC) -I../../src -I../../deps -I../../include $(SRC) -o $(TARGET) -L../../ $(LINK)

clean:
rm $(TARGET)
2 changes: 1 addition & 1 deletion examples/cors/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../"
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

./demo
2 changes: 1 addition & 1 deletion examples/html/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TARGET := demo
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) -I../../src -I../../deps $(SRC) -o $(TARGET) -L../../ $(LINK)
$(CC) -I../../src -I../../deps -I../../include $(SRC) -o $(TARGET) -L../../ $(LINK)

clean:
rm $(TARGET)
2 changes: 1 addition & 1 deletion examples/html/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../"
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

./demo
2 changes: 1 addition & 1 deletion examples/middleware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TARGET := demo
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) -I../../src -I../../deps $(SRC) -o $(TARGET) -L../../ $(LINK)
$(CC) -I../../src -I../../deps -I../../include $(SRC) -o $(TARGET) -L../../ $(LINK)

clean:
rm $(TARGET)
2 changes: 1 addition & 1 deletion examples/middleware/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../"
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

./demo
2 changes: 1 addition & 1 deletion examples/nested-routers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TARGET := demo
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) -I../../src -I../../deps $(SRC) -o $(TARGET) -L../../ $(LINK)
$(CC) -I../../src -I../../deps -I../../include $(SRC) -o $(TARGET) -L../../ $(LINK)

clean:
rm $(TARGET)
2 changes: 1 addition & 1 deletion examples/nested-routers/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../"
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

./demo
2 changes: 1 addition & 1 deletion examples/rest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TARGET := demo
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) -I../../src -I../../deps $(SRC) -o $(TARGET) -L../../ $(LINK)
$(CC) -I../../src -I../../deps -I../../include $(SRC) -o $(TARGET) -L../../ $(LINK)

clean:
rm $(TARGET)
2 changes: 1 addition & 1 deletion examples/rest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../"
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

./demo
2 changes: 1 addition & 1 deletion examples/simple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TARGET := demo
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) -I../../src -I../../deps $(SRC) -o $(TARGET) -L../../ $(LINK)
$(CC) -I../../src -I../../deps -I../../include $(SRC) -o $(TARGET) -L../../ $(LINK)

clean:
rm $(TARGET)
2 changes: 1 addition & 1 deletion examples/simple/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../"
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

./demo
2 changes: 1 addition & 1 deletion examples/tls/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TARGET := demo
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) -I../../src -I../../deps $(SRC) -o $(TARGET) -L../../ -lys
$(CC) -I../../src -I../../deps -I../../include $(SRC) -o $(TARGET) -L../../ -lys

clean:
rm $(TARGET)
2 changes: 1 addition & 1 deletion examples/tls/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../../"
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

./demo
2 changes: 1 addition & 1 deletion scripts/integ.bash
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ main () {

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:."
[[ "$OSTYPE" == "darwin"* ]] && {
export DYLD_LIBARY_PATH="$DYLD_LIBARY_PATH:$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH"
}

run
Expand Down

0 comments on commit e1bda35

Please sign in to comment.