source: trunk/Makefile.common @ 198

Last change on this file since 198 was 198, checked in by titer, 16 years ago

Nicer make output. Also moved the CLI client to its own folder like
other interfaces.

File size: 1.2 KB
Line 
1VERSION_MAJOR  = 0
2VERSION_MINOR  = 5
3VERSION_STRING = 0.6-svn
4
5RM        = rm -Rf
6MOREFLAGS = -g -Wall -W -O3 -funroll-loops -D_FILE_OFFSET_BITS=64 \
7            -D_LARGEFILE_SOURCE -D_GNU_SOURCE \
8            -DVERSION_MAJOR=$(VERSION_MAJOR) \
9            -DVERSION_MINOR=$(VERSION_MINOR) \
10            -DVERSION_STRING=\"$(VERSION_STRING)\" \
11            -DSYS_$(shell echo $(SYSTEM) | tr a-z A-Z)
12CFLAGS   += $(MOREFLAGS)
13CXXFLAGS += $(MOREFLAGS)
14
15ifeq ($(SYSTEM),BeOS)
16CXXFLAGS += -Wno-multichar
17ifeq ($(BEOS_NETSERVER),yes)
18CFLAGS  += -DBEOS_NETSERVER
19LDFLAGS += -lnet
20else
21LDFLAGS += -lbind -lsocket
22endif
23endif
24
25ifeq ($(PTHREAD),yes)
26ifeq ($(SYSTEM),FreeBSD)
27LDFLAGS += -pthread
28else
29LDFLAGS += -lpthread
30endif
31endif
32
33ifeq ($(OPENSSL),yes)
34CFLAGS  += -DHAVE_OPENSSL
35LDFLAGS += -lcrypto
36endif
37
38#
39# Utils
40#
41
42define DEP_RULE
43        @echo "Checking dependencies..."
44        @$(RM) .depend
45        @$(foreach SRC, $(SRCS), $(CC) -MM $(SRC) $(CFLAGS) >> .depend;)
46endef
47
48define CC_RULE
49        @echo "Cc $@"
50        @CMD="$(CC) $(CFLAGS) -o $@ -c $<"; $$CMD || \
51          ( echo "Compile line for $@ was:"; echo $$CMD; false )
52endef
53
54define LINK_RULE
55        @echo "Link $@"
56        @CMD="$(CC) -o $@ $(OBJS) $(LDFLAGS)"; $$CMD || \
57          ( echo "Compile line for $@ was:"; echo $$CMD; false )
58endef
59
60MAKE += --no-print-directory
Note: See TracBrowser for help on using the repository browser.