CROSS_COMPILE ?= KDIR ?= CC := $(CROSS_COMPILE)gcc CFLAGS := -O2 -W -Wall -I$(KDIR)/usr/include LDFLAGS := -Lisp LIBS := -lomap3isp -lrt OBJ_LIVE := live.o videoout.o OBJ_SNAP := snapshot.o %.o : %.c $(CC) $(CFLAGS) -c -o $@ $< all: __isp live snapshot live: $(OBJ_LIVE) isp/libomap3isp.so $(CC) $(LDFLAGS) -o $@ $(OBJ_LIVE) $(LIBS) snapshot: $(OBJ_SNAP) isp/libomap3isp.so $(CC) $(LDFLAGS) -o $@ $(OBJ_SNAP) $(LIBS) __isp: $(MAKE) -C isp CROSS_COMPILE=$(CROSS_COMPILE) KDIR=$(KDIR) clean: $(MAKE) -C isp clean -$(RM) *.o -$(RM) live -$(RM) snapshot