# Compiler/linker setup ------------------------------------------------------

# Mac OS X-specific flags.  Comment these out if using Linux.
#PLATFORM = osx
#CC       = gcc
#CFLAGS   = -fast -Wall
#OSLIBS   = -Wl,-framework -Wl,IOKit
#LDFLAGS  =

# Linux-specific flags.  Comment these out if using Mac OS X.
PLATFORM = linux
CC       = g++
CFLAGS   = -O3 -Wall
OSLIBS   =
LDFLAGS  =

# make all: all OBJS are compiled and executable available
# make <individual>
# make clean
# '-lpthread' has to be included at the end of the command (can't be in the CFLAGS)
# do not use spaces (tabs are allowed)
# Example programs -----------------------------------------------------------

OBJS = simple
all: $(OBJS)

simple: simple.cpp simple_fun.o
	$(CC) $(CFLAGS) -o simple simple.cpp simple_fun.o

# library
simple_fun.o: simple_fun.cpp simple_fun.h
	$(CC) $(CFLAGS) -c simple_fun.cpp

# Maintenance and stuff ------------------------------------------------------
clean:
	rm -f $(OBJS) *.o core
