--- Makefile.orig 2001-08-25 18:09:00 UTC +++ Makefile @@ -5,43 +5,46 @@ # very welcome). # for linux -DEFS = -DOS_LINUX -EXTRA_OBJS = cd_ll_linux.o +#DEFS = -DOS_LINUX +#EXTRA_OBJS = cd_ll_linux.o # for bsd. only tested on freebsd -#DEFS = -DOS_BSD -#EXTRA_OBJS = cd_ll_bsd.o - +DEFS = -DOS_BSD +EXTRA_OBJS = cd_ll_bsd.o +CDDEVICE=\"/dev/cdrom\" # you shouldn't have to change anything below this line - +BINPATH=${PREFIX}/bin/ OBJS=cd-console.o cd.o $(EXTRA_OBJS) LIBS = -lncurses # common -CFLAGS=-O2 -Wall $(DEFS) +CFLAGS+= $(DEFS) #CFLAGS=-g -Wall $(DEFS) -CC = gcc +#CC = gcc all: make cd-console strip cd-console cd-console: $(OBJS) - $(CC) $(OBJS) $(LIBS) -o cd-console $(CFLAGS) + $(CXX) $(OBJS) $(LIBS) -o cd-console $(CFLAGS) cd-console.o: cd.h cd-console.cpp - $(CC) -c cd-console.cpp $(CFLAGS) + $(CXX) -c cd-console.cpp $(CFLAGS) cd_ll_linux.o: cd_ll.h cd_ll_linux.h cd_ll_linux.cpp - $(CC) -c cd_ll_linux.cpp $(CFLAGS) + $(CXX) -c cd_ll_linux.cpp $(CFLAGS) cd_ll_bsd.o: cd_ll.h cd_ll_bsd.h cd_ll_bsd.cpp - $(CC) -c cd_ll_bsd.cpp $(CFLAGS) + $(CXX) -c -DDEVICE=$(CDDEVICE) cd_ll_bsd.cpp $(CFLAGS) cd.o: cd.h cd.cpp - $(CC) -c cd.cpp $(CFLAGS) + $(CXX) -c cd.cpp $(CFLAGS) clean: rm -f $(OBJS) cd-console + +install: + @$(BSD_INSTALL_PROGRAM) cd-console $(BINPATH)