im currently trying to make a good makefile thats small and not too bloated.
here is what i got so far, and this works very good (only example application to test it):
Code: Select all
CPP = g++
APP = framework
OBJ = main.cpp IGame.cpp
LINKOBJ = main.o IGame.o
FLAGS = -fexpensive-optimizations -O3 -pipe -g3
DIRS = -L"../irrlicht-0.10.0/lib/Linux" -I"../irrlicht-0.10.0/include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib"
DEPS = -lIrrlicht -lGL -lXxf86vm -lXext -lX11
all:
$(CPP) -c $(OBJ) $(DIRS) $(DEPS) $(FLAGS)
$(CPP) $(LINKOBJ) -o $(APP) $(DIRS) $(DEPS) $(FLAGS)
run:
clear;make -s;clear;./$(APP);clear
clean:
rm -r $(LINKOBJ) $(APP)
ps: is there a way to make "make" quiet? i dont want to see the damn output everytime i compile it, something like "compiling..." should be enough (warnings or errors should appear though)
i'll have a look at the manpages, maybe they help - cheers!