source: trunk/Makefile.common @ 260

Last change on this file since 260 was 260, checked in by titer, 15 years ago

Added $Id$ keywords and updated a few headers

File size: 1.9 KB
Line 
1# $Id$
2
3VERSION_MAJOR  = 0
4VERSION_MINOR  = 5
5VERSION_STRING = 0.6-svn-r$(SVN_REVISION)
6
7TMPCFLAGS   = -g -Wall -W -O3 -funroll-loops -D_FILE_OFFSET_BITS=64 \
8              -D_LARGEFILE_SOURCE -D_GNU_SOURCE \
9              -DVERSION_MAJOR=$(VERSION_MAJOR) \
10              -DVERSION_MINOR=$(VERSION_MINOR) \
11              -DVERSION_STRING=\"$(VERSION_STRING)\" \
12              -DSYS_$(shell echo $(SYSTEM) | tr a-z A-Z)
13TMPCXXFLAGS = $(TMPCFLAGS)
14TMPLDFLAGS  =
15
16ifeq ($(SYSTEM),BeOS)
17TMPCXXFLAGS += -Wno-multichar
18ifeq ($(BEOS_NETSERVER),yes)
19TMPCFLAGS  += -DBEOS_NETSERVER
20TMPLDFLAGS += -lnet
21else
22TMPLDFLAGS += -lbind -lsocket
23endif
24endif
25
26ifeq ($(PTHREAD),yes)
27ifeq ($(SYSTEM),FreeBSD)
28TMPLDFLAGS += -pthread
29else
30TMPLDFLAGS += -lpthread
31endif
32endif
33
34ifeq ($(OPENSSL),yes)
35TMPCFLAGS  += -DHAVE_OPENSSL
36TMPLDFLAGS += -lcrypto
37endif
38
39CFLAGS   := $(TMPCFLAGS) $(CFLAGS)
40CXXFLAGS := $(TMPCXXFLAGS) $(CXXFLAGS)
41LDFLAGS  := $(TMPLDFLAGS) $(LDFLAGS)
42
43#
44# Utils
45#
46
47define DEP_RULE
48        @echo "Checking dependencies..."
49        @$(RM) .depend
50        @$(foreach SRC, $(SRCS), $(CC) -MM $(SRC) $(CFLAGS) >> .depend;)
51endef
52
53define CC_RULE
54        @echo "Cc $@"
55        @CMD="$(CC) $(CFLAGS) -o $@ -c $<"; $$CMD || \
56          ( echo "Compile line for $@ was:"; echo $$CMD; false )
57endef
58
59define LINK_RULE
60        @echo "Link $@"
61        @CMD="$(CC) -o $@ $(OBJS) $(LDFLAGS)"; $$CMD || \
62          ( echo "Compile line for $@ was:"; echo $$CMD; false )
63endef
64
65define MSGFMT_RULE
66       @echo "Msgfmt $<"
67       @msgfmt -f $< -o $@
68endef
69
70define INSTALL_BIN_RULE
71       @echo "Install $<"
72       @$(MKDIR) $(PREFIX)/bin
73       @$(CP) $< $(PREFIX)/bin/
74endef
75
76define INSTALL_LOCALE_RULE
77       @echo "Install $<"
78       @$(MKDIR) $(LOCALEDIR)/$*/LC_MESSAGES
79       @$(CP) $< $(LOCALEDIR)/$*/LC_MESSAGES/transmission-gtk.mo
80endef
81
82define INSTALL_MAN_RULE
83        @echo "Install $<"
84        @$(MKDIR) $(PREFIX)/man/man1
85        @$(CP) $< $(PREFIX)/man/man1/
86endef
87
88RM    = rm -Rf
89CP    = cp -f
90MKDIR = mkdir -p
91MAKE += --no-print-directory
Note: See TracBrowser for help on using the repository browser.