# the shared memory example from OSC 9e Sec. 3.5.1, Fig. 3.17, 3.18

# this must use GNU Make ("make" on Linux and Mac OS X, "gmake" on Solaris)

# compiler options -- C99 with warnings
OPT_GCC = -std=c99 -Wall -Wextra

# compiler options and libraries for Linux, Mac OS X or Solaris
OPT = -D_XOPEN_SOURCE=700
LIBDIR = -L/usr/local/lib
INCDIR = -I/usr/local/include
LIB = -lrt -pthread -lcfitsio -lcurl -lm
INCLUDE = shm_camera.h

all: acq rec

rec: record_camera.c
	gcc $(OPT_GCC) $(OPT) -o rec record_camera.c $(INCLUDE) $(LIBDIR) $(INCDIR) $(LIB) 

acq: acquisition_camera.c
	gcc $(OPT_GCC) $(OPT) -o acq acquisition_camera.c $(INCLUDE) $(LIBDIR) $(INCDIR) $(LIB) 

clean:
	rm -f acq rec
