Skip to content

Instantly share code, notes, and snippets.

@almet
Created November 1, 2010 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almet/658300 to your computer and use it in GitHub Desktop.
Save almet/658300 to your computer and use it in GitHub Desktop.
PROJECT = pigeonhol
LIB = lib/
SRC = src/
BUILD = build/
OBJ = main.o observer.o
LIBS = inotify-cxx
CPP = g++
CXXFLAGS = -Wall -ansi -pedantic-errors
all: $(OBJ)
if [ ! -d "$(BUILD)" ]; then \
mkdir $(BUILD); \
fi
$(CPP) $^ -L $(LIB) -l$(LIBS) -o $(BUILD)$(PROJECT) $(CXXFLAGS)
%.o: %.cpp
$(CPP) -c $(SRC)$< -o $(BUILD)$< $(CXXFLAGS)
compilelib:
$(CPP) -c $(LIB)inotify-cxx.cpp -o $(LIB)inotify-cxx.o
ar -q $(LIB)libinotify-cxx.a $(LIB)inotify-cxx.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment