source: Make/Makedefs @ 32

Revision 32, 1.7 KB checked in by art, 12 years ago (diff)
RevLine 
[11]1#-----------------------------------------------
[32]2# Find out the platform
3#-----------------------------------------------
4SHELL = /bin/sh
5OS := $(shell uname)
6
7## IRIX ?
8ifeq ($(findstring IRIX,$(OS)),IRIX)
9OS := IRIX
10endif
11
12## Make CYGWIN_XXXX CYGWIN so it's "Windows cross platform" :)
13ifeq ($(findstring CYGWIN,$(OS)),CYGWIN)
14OS := CYGWIN
15endif
16
17## Make MINGW_XXXX MINGW so it's "Windows cross platform" :)
18ifeq ($(findstring MINGW,$(OS)),MINGW)
19OS := MINGW
20endif
21
22#-----------------------------------------------
[11]23# Paths where to find includes and libraries
24#-----------------------------------------------
[12]25TOPDIR ?= .
26BUILDPATH = build
27VPATH =. $(BUILDPATH)
[11]28
29prefix ?= /usr/local
30exec_prefix = $(prefix)
31bindir = $(exec_prefix)/bin
32libdir = $(exec_prefix)/lib
33incdir = $(exec_prefix)/include
34
[13]35INCPATH ?= -I$(prefix)/include -I/usr/local/include -I/usr/include
36LIBPATH ?= -L$(prefix)/lib -L/usr/local/lib -L/usr/lib
37
[11]38INST_LOCATION = $(prefix)
39INST_LOCATION_BIN = $(INST_LOCATION)/bin
40INST_LOCATION_LIB = $(INST_LOCATION)/lib
41INST_LOCATION_INC = $(INST_LOCATION)/include
42
43#-----------------------------------------------
44# Define macros with compiler options
45#-----------------------------------------------
[12]46CC = g++
[32]47CFLAGS = -pthread -O2 -Wall -Werror $(INCPATH)
[12]48LIBS =
49LDFLAGS = -shared $(LIBPATH) $(LIBS)
50DEPARG = -MM
[11]51
52INSTALL = install -c
53INSTALL_INC = $(INSTALL) -m 644
54INSTALL_BIN = $(INSTALL)
55INSTALL_LIB = $(INSTALL)
56INSTALL_DIR = $(INSTALL) -d
57MKDIR = mkdir
58MAKE = make
59
60INSTALL_DIRS = $(INST_LOCATION_LIB) $(INST_LOCATION_INC)
61
62#-----------------------------------------------
63# Defining macros for building
64#-----------------------------------------------
65OBJECTS=$(CPPFILES:.cpp=.o)\
66                $(CFILES:.c=.o)
67
68DEPENDS=$(CPPFILES:.cpp=.d)\
69                $(CFILES:.c=.cd)
70               
71               
Note: See TracBrowser for help on using the repository browser.