# Makefile
# laser3d project - 3D visualization of laser data acquired by robot
# Author      : Michael Kaess
# Initial     : 02/15/2001
# Last Change : 12/27/2001


# use to generate code with debug information
#DEBUG_ = -g

# use if your data is recorded on a machine with
# different byte order than the one you run laser3d on
#BYTE_ORDER_  -DCHANGE_BYTE_ORDER

CFLAGS = $(DEBUG_) $(BYTE_ORDER_) -Wall
LIBS =  -lglut -lGLU -lGL
LPATH = -L/usr/X11R6/lib
INCS = -I/usr/X11R6/include
CC = g++
RM = rm -f

TARGET = laser3d

SRCS =  laser3d.c graphics.c data.c vertex.c
OBJS =  $(SRCS:.c=.o)

LCOPTS = -fullwarn -wlint

.c.o:
	$(CC) $(CFLAGS) $(INCS) -c $*.c -o $*.o

default: all

all:	$(TARGET)

$(TARGET):	$(OBJS) laser3d.h
	$(RM) $@
	$(CC) -o $@ $(CFLAGS) $(OBJS) $(LPATH) $(LIBS)

clean:
	$(RM) *.o *~ core a.out

veryclean: clean
	$(RM) $(TARGET)




# for different architectures
# this worked for special configurations, but maybe doesn't work on other machines...
# TODO

3dIrix:
	CC -I/usr/local/include/gl -I/usr/local/include laser3d.c data.c graphics.c vertex.c -o laser3d /usr/local/lib/libglut.a -lXmu -lXext -lX11 -lGL -lGLU -lm -32

SGI:
	CC -DCHANGE_BYTE_ORDER -I/usr/local/include/gl -I/usr/local/include laser3d.c data.c graphics.c vertex.c -o laser3d /usr/local/lib/libglut.a -lXmu -lXext -lX11 -lGL -lGLU -lm -32
