-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.rules
45 lines (32 loc) · 1.07 KB
/
make.rules
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
# $Id: make.rules,v 1.3 2007/05/07 13:46:22 derek Exp $
ifndef HOSTNAME
HOSTNAME := $(shell hostname)
endif
include ../$(HOSTNAME).config
OS=$(shell ../getos.sh)
ARCH=$(shell ../getarch.sh)
PLATFORM=$(OS).$(ARCH)
APR_LDIR=$(shell $(APR_BIN) --link-ld --libs)
APRUI_LDIR=$(shell $(APRUI_BIN) --link-ld --libs)
LDIR=-L../../$(PLATFORM)/lib -lm $(if $(ALTLOCAL),-L$(ALTLOCAL)/lib) $(APR_LDIR)
VPATH=../../$(PLATFORM)/lib:../../$(PLATFORM)/bin:../../$(PLATFORM)/bin/tools:../../$(PLATFORM)/obj:.
BINDIR=../../$(PLATFORM)/bin
OBJDIR=../../$(PLATFORM)/obj
LIBDIR=../../$(PLATFORM)/lib
SRCDIR=../../$(PLATFORM)/gen-src
#LINUX SPECIFIC
ifeq ("$(OS).$(ARCH)", "linux.x86")
endif
CC=gcc
LD=gcc
AR=ar
APR_CFLAGS=$(shell $(APR_BIN) --cppflags)
CFLAGS= $(PLATFORM_CFLAGS) -D_REENTRANT -g -O3 -Wall $(APR_CFLAGS)
APR_INC=$(shell $(APR_BIN) --includes)
INC=-I../include $(if $(ALTLOCAL),-I$(ALTLOCAL)/include) $(APR_INC)
OBJS=$(foreach n, $(basename $(SRC)), $(OBJDIR)/$(n).o)
$(OBJDIR)/%.o: %.c
@-mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(INC) -c $< -o $@
../%.config :
../getenv.sh $@