Skip to content

Commit

Permalink
Feat: add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
moesnow committed Jul 11, 2023
1 parent 86d6522 commit 3333dc8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CC = g++
CFLAGS = -Wall -Werror -std=c++11
LIBS = -lcurl

TARGET = bing-wallpaper-macos

# 检查处理器架构
ifeq ($(shell uname -p), arm)
CFLAGS += -I/opt/homebrew/Cellar/nlohmann-json/3.11.2/include/
else
CFLAGS += -I/usr/local/Cellar/nlohmann-json/3.11.2/include/
endif

.PHONY: all clean

all: $(TARGET)

$(TARGET): bing-wallpaper-macos.cpp
$(CC) $(CFLAGS) $< -o $@ $(LIBS)

clean:
rm -f $(TARGET)

0 comments on commit 3333dc8

Please sign in to comment.