summaryrefslogtreecommitdiff
path: root/muse2/muse/make.inc
blob: a88e1f9586d692cab68fc9bb8d728488f011b22b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#=========================================================
#  MusE
#  Linux Music Editor
#    $Id: make.inc,v 1.1.1.1 2003/10/27 18:51:34 wschweer Exp $
#  (C) Copyright 1999-2001 Werner Schweer (ws@seh.de)
#=========================================================

#----------------------------------------------------
#     basic path
#
ifndef QTDIR_BIN
QTDIR_BIN   = /usr/qt3/bin
endif

ifndef QTDIR_LIB
QTDIR_LIB   = /usr/qt3/lib
endif

ifndef QTDIR_INC
QTDIR_INC  = /usr/qt3/include
endif

PREFIX      = /usr/muse
INSTDIR     = $(PREFIX)/share
INSTLIBDIR  = $(PREFIX)/lib
BINDIR      = /usr/bin

#-----------------------------------------------------
#     basic flags
#
# experimental KDE Flag
# compiles with KDE Support:
#
#     KMainWindow  <--> QMainWindow
#     KToolbar     <--> QToolBar
#
# Current Status: dont use: (set to NO); there are some issues
#                 If you want to debug this:
#                 you also need Tommi Ilmonens "givertcap" because
#                 you cannot run MusE suid root with KDE libs
HAVE_KDE = no
KDEDIR   = /usr/kde2

#
#     AUDIO, ALSA  - always required
#     ALSACVS  - use newest ALSA CVS (include /usr/include/alsa/asoundlib.h
#                                    instead of /usr/include/sys/asooundlib.h)
AUDIO = yes
ALSA  = yes
OSS   = yes
ALSACVS = yes

# use Tommi Ilmonens "givertcap "to give RealTime capabilities to
# MusE; with the use of this utility MusE did not need "suid root"
# flags anymore
# more info at http://www.tml.hut.fi/~tilmonen/givertcap/

RTCAP = no

#---------------------------------------------------------------

CC         = /usr/bin/g++
QTLIB      = qt-mt
MOC        = $(QTDIR_BIN)/moc
UIC        = $(QTDIR_BIN)/uic
LUPDATE    = $(QTDIR_BIN)/lupdate
LRELEASE   = $(QTDIR_BIN)/lrelease
CPP        = cpp

#-----------------------------------------------------
OLDVERSION = 0.5.1
VERSION    = 0.5.2

INCLUDES = -I.
#FLAGS    = -Wall -W -Wshadow -D_GNU_SOURCE
FLAGS    = -Wall -W -D_GNU_SOURCE
# FLAGS    = -W -D_GNU_SOURCE
ifeq ($(HAVE_KDE),yes)
INCLUDES += -I$(KDEDIR)/include
FLAGS    += -DHAVE_KDE
endif

ifeq ($(ALSACVS),yes)
FLAGS += -DALSACVS
endif

#-----------------------------------------------------
#  DEBUG = yes generates debuggable (non optimized) version
#
DEBUG = no

ifeq ($(DEBUG),yes)
FLAGS   += -g  # -DMEMORY_DEBUG
else
FLAGS   += -O2 -g
FLAGS   += -DNDEBUG
endif

ifeq ($(AUDIO),yes)
FLAGS   += -DAUDIO
endif

ifeq ($(RTCAP),yes)
FLAGS   += -DRTCAP
endif

#-----------------------------------------------------
#  nothing to config below this line
#
ifdef TOPDIR
INCLUDES += -Imidiedit -Iscore -Iarranger -Iliste
INCLUDES += -Iwidgets -Imixer -Idriver -Iwaveedit -Implugins
else
INCLUDES += -I$(MUSETOP) -I$(MUSETOP)/widgets -I$(MUSETOP)/driver
endif

INCLUDES += -Iarchiv -I$(QTDIR_INC)
FLAGS  += -DQT_CLEAN_NAMESPACE -DQT_NOCOMPAT -DQT_NO_ASCII_CAST
# FLAGS  += -fno-exceptions
FLAGS  += -D_REENTRANT -DVERSION=\"$(VERSION)\"
FLAGS  += -DINSTDIR=\"$(INSTDIR)\"
FLAGS  += -DINSTLIBDIR=\"$(INSTLIBDIR)\"

ifeq ($(ALSA),yes)
FLAGS  += -DALSA
endif
ifeq ($(OSS),yes)
FLAGS  += -DOSS
endif

ALL_CFLAGS = $(FLAGS) $(INCLUDES) $(CFLAGS)

.PHONY: all target clean depend test translations
.SUFFIXES: .ui

%.o: %.c
	$(CC) -c $(ALL_CFLAGS) $< -o $@
obj/%.o: %.c
	$(CC) -c $(ALL_CFLAGS) $< -o $@
.ui.h:
	$(UIC) $< -o $*.h
.ui.c:
	$(UIC) -o $*.c -impl $*.h $<
obj/moc_%.c: %.h
	$(MOC) $< -o obj/moc_$*.c


all:  target

clean::
	-@rm -f *.o obj/* *.bak $(GENSRC:=.h) $(GENSRC:=.c)

depend::  $(GENSRC:=.h)
depend::
	-$(CC) -MM $(ALL_CFLAGS) $(SRC:=.c) $(MSRC:=.c) | sed -e 's/^.*\.o:/obj\/\0/' >.depend

-include .depend

ifndef TOPDIR
MAKE = make
endif

install:: ;