I know this is a little bit unusual to do in Makefiles, but I would really like to do it. I would like to make so that if I run the Makefile it opens the program (Already done), but if there is nothing to be done it runs too :/. How can I do that?
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)