source: roaraudio/build-system/Makefile.common @ 5782:d3fdb219cc4a

Last change on this file since 5782:d3fdb219cc4a was 5782:d3fdb219cc4a, checked in by phi, 11 years ago

only set BASENAME and ROAR_DBG_PREFIX if not using dummy values

File size: 1.6 KB
Line 
1#     Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2012
2#
3# This file is part of roard a part of RoarAudio,
4# a cross-platform sound system for both, home and professional use.
5# See README for details.
6#
7# This file is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License version 3
9# as published by the Free Software Foundation.
10#
11# RoarAudio is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this software; see the file COPYING.  If not, write to
18# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19# Boston, MA 02110-1301, USA.
20
21OBJS        ?= $(BASENAME).o
22
23ifneq ($(origin BASENAME), undefined)
24DEFINES     += -DBASENAME="\"$(BASENAME)\""
25endif
26ifneq ($(origin TARGET), undefined)
27DEFINES     += -DROAR_DBG_PREFIX="\"$(TARGET)\""
28endif
29
30TARGETS     ?= $(TARGET)
31TARGET      ?= DUMMY
32
33OPTI_O      ?= -O2
34CFLAGS      += -Wall $(Wextra) -g $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(ROAR_CFLAGS)
35LDFLAGS     += -Wall $(Wextra) -g $(OPTI_O) $(LDPATH)
36LIBS        += $(lib_roar)
37
38all: $(TARGETS)
39clean:
40        rm -f $(TARGETS) *.o
41new: clean all
42
43distclean: clean
44        rm -f Makefile.conf config.h config.log
45
46$(TARGET): $(OBJS)
47        $(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
48
49#define at least some as phony
50.PHONY: all clean new distclean prep-install-dirs prep-install install semi-install uninstall
51
52#ll
Note: See TracBrowser for help on using the repository browser.