gpt4 book ai didi

c++ - 如果什么都不做,请检查 Makefile

转载 作者:行者123 更新时间:2023-11-30 03:45:53 24 4
gpt4 key购买 nike

<分区>

我知道在 Makefile 中这样做有点不寻常,但我真的很想这样做。我想这样做,如果我运行 Makefile,它会打开程序(已经完成),但如果没有什么可做的,它也会运行:/。我该怎么做?

生成文件 =

#Compiler to use
CC = g++

#LUA STUFF
LUAHOME = /usr/local/Cellar/lua/5.3.2/src

#Boost Paths
BOOST_LIB = /usr/local/Cellar/boost/1.59.0/lib
BOOST_INCLUDE = /usr/local/Cellar/boost/1.59.0/include

#Steam Paths
STEAM_LIB = libs/steam/redistributable_bin/osx32
STEAM_INCLUDE = libs/steam/public/steam

#Flags for the compiler
LFLAGS = -L$(LUAHOME) -I$(LUAHOME) -llua -L$(STEAM_LIB) -I$(STEAM_INCLUDE) -L$(BOOST_LIB) -I$(BOOST_INCLUDE) -lboost_system -lboost_filesystem -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lglew -lglfw3 -w -o Relieved
OFLAGS = -c -Wall

#Name of the Compiled Program
NAME = Relieved

#All CPPs
CPP = main.cpp jelly/lua_manager.cpp jelly/keysManager.cpp

#Objects
OBJECTS = $(CPP:.cpp=.o)

all: $(CPP) $(NAME)

$(NAME): $(OBJECTS)
$(CC) $(LFLAGS) $(OBJECTS) -o $@

./$(NAME)

.cpp.o:
$(CC) $(OFLAGS) $< -o $@

clean:
rm $(OBJECTS) $(NAME)

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com