freebsd-ports/audio/csound/files/patch-Makefile
Trevor Johnson 3e0febf33b Use Tk and Tcl 8.4 rather than 8.3.
Submitted by:	kris
2003-10-18 07:18:14 +00:00

108 lines
3.5 KiB
Text

--- Makefile.orig Thu Apr 24 15:00:58 2003
+++ Makefile Thu Apr 24 15:03:27 2003
@@ -1,17 +1,17 @@
# Csound Makefile
# edit the following definitions according to need:
-INCLUDE = /usr/local/include
-LIB = /usr/local/lib
-DEST = /usr/local/bin
-MAN = /usr/local/man
+INCLUDE = $(PREFIX)/include
+LIB = $(PREFIX)/lib
+DEST = $(PREFIX)/bin
+MAN = $(PREFIX)/man
MAN1 = $(MAN)/man1
CAT1 = $(MAN)/cat1
# these directories must exist for stages beyond 'make csound'
CDEP =
COBS = $(COBJS)
-CC = cc
+CC ?= cc
# choose either -
# CDEP = for UNIX
# COBS = $(COBJS)
@@ -23,7 +23,7 @@
# .c.o:
# $(CC) $(CFLAGS) -c $*.c -o $@
-DEFINES = -DWINDOWS -DRTAUDIO -DSFIRCAM -DSYS5 -DLINUX -DPIPES -DMACROS -DTCLTK -DIV_SCHED -DHAVE_FLTK
+DEFINES = -DRTAUDIO -DSFIRCAM -DSYS5 -DLINUX -DPIPES -DMACROS -DTCLTK -DIV_SCHED -DFREE_BSD
# choose any of -
# -DSYS5 invoke System 5 headers (e.g. 'string.h' for 'strings.h')
# -DWINDOWS include window system calls (X11, SGI, or FG graphics)
@@ -50,7 +50,7 @@
# (e.g., Linux on SPARC [not tested]), you should also define -
# -DLINUX_BE Linux audio device handler for big-endian samples
-CFLAGS = -Wall -O2 -malign-loops=4 -malign-jumps=4 -ffast-math -fomit-frame-pointer -finline-functions -funroll-loops -DWITHx87 $(RPM_OPT_FLAGS) $(DEFINES)
+CFLAGS = $(CPPFLAGS) $(LDFLAGS) $(DEFINES)
# -O Simple optimisation
# -O2 to be more specific about the optimization level
# -f compile single-precision floats (4.3,VAX,DEC-RISC)
@@ -88,14 +88,14 @@
# uncomment these if HAVE_FLTK was enabled in DEFINES
#
-CXX = g++
-CXXFLAGS = -fno-exceptions -fno-rtti
-FLTKSRC = widgets.cpp
-FLTKOBJ = widgets.o
+CXX ?= g++
+#CXXFLAGS = -fno-exceptions -fno-rtti
+#FLTKSRC = widgets.cpp
+#FLTKOBJ = widgets.o
# source and object files for FLTK widgets
#FLTKLIB = -lfltk -lpthread -lg++
-FLTKLIB = /usr/local/lib/libfltk.a /usr/lib/libpthread.a \
- /usr/lib/libstdc++-libc6.2-2.a.3
+#FLTKLIB = /usr/local/lib/libfltk.a /usr/lib/libpthread.a \
+# /usr/lib/libstdc++-libc6.2-2.a.3
# libraries required by widgets.cpp
# -lfltk -lpthread -lg++ use dynamic libraries
#
@@ -105,7 +105,7 @@
# directiories and version
# numbers are system-dependent)
-LIBS = $(FLTKLIB) -L /usr/X11R6/lib -lX11 -ltcl -ltk -lm -ldl
+LIBS = -L$(X11BASE)/lib -L$(LOCALBASE)/lib -lX11 -ltcl84 -ltk84 -lm
# -lefence
# -lm required
# -lX11 for X window calls
@@ -124,8 +124,8 @@
# note: SuSE 7.3 users should use -ltcl8.3 -ltk8.3, but another
# (probably better) solution is to create symbolic links
-WINSRC = winFLTK.c FL_graph.cpp
-WINOBJ = winFLTK.o FL_graph.o
+#WINSRC = winFLTK.c FL_graph.cpp
+#WINOBJ = winFLTK.o FL_graph.o
# ;if WINDOWS enabled in DEFINES, choose one of -
# winX11.o for X11 window graphics
# winSGI.o for SGI window graphics
@@ -133,10 +133,10 @@
# winFLTK.o and FL_graph.o for `improved' X graphics
# and many others....winbor, wincwin
-#AUDSRC = rtlinux.c LINUXaudio.c
-#AUDOBJ = rtlinux.o LINUXaudio.o
-AUDSRC = rtalsa.c
-AUDOBJ = rtalsa.c
+AUDSRC = rtlinux.c LINUXaudio.c
+AUDOBJ = rtlinux.o LINUXaudio.o
+#AUDSRC = rtalsa.c
+#AUDOBJ = rtalsa.c
# ;if RTAUDIO enabled in DEFINES, include one of
# rtaudio.o general interface to audio handlers & libraries
# rtDEC.c rtSGI.c rtHP.c rtSUN.c
@@ -283,7 +283,7 @@
all: $(PROGS) $(SUBDIRS) #must be run in this order
csound: $(COBJS) $(CSUM) $(CDEP) csound.xmg
- $(CC) $(CFLAGS) -o csound $(COBJS) $(LIBS)
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o csound $(COBJS) $(LIBS)
TAGS: $(CSRCS) $(HDRS)
etags $(CSRCS) $(HDRS)