forked from MarcJHuber/event-driven-servers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.inc
54 lines (38 loc) · 1.14 KB
/
Makefile.inc
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
45
46
47
48
49
50
51
52
53
############################################################## vim: ft=make ts=4
# Makefile.inc
# (C) 1997-2009 Marc Huber <[email protected]>
################################################################################
ifeq ($(MAKEFILE_INC_INCLUDED),)
MAKEFILE_INC_INCLUDED=1
TR = /usr/bin/tr
ifneq ($(wildcard /usr/xpg4/bin/tr),)
TR = /usr/xpg4/bin/tr
endif
OSs := $(shell uname -s | env -i $(TR) "[:upper:]/ " "[:lower:]--")
OSr := $(shell uname -r | sed "s/(.*)//" | env -i $(TR) "[:upper:]/ " "[:lower:]--")
OSm := $(shell uname -m | env -i $(TR) "[:upper:]/ " "[:lower:]--")
OS := $(OSs)-$(OSr)-$(OSm)
MF_OBJ=build/Makefile.inc.$(OS)
ifeq ($(wildcard $(MF_OBJ)),)
MF_OBJ=../build/Makefile.inc.$(OS)
ifeq ($(wildcard $(MF_OBJ)),)
MF_OBJ=../../build/Makefile.inc.$(OS)
ifeq ($(wildcard $(MF_OBJ)),)
MF_OBJ=../../../build/Makefile.inc.$(OS)
ifeq ($(wildcard $(MF_OBJ)),)
$(error Please run the configure script to create Makefile.inc.$(OS))
endif
endif
endif
endif
include $(MF_OBJ)
%:: %,v
%:: RCS/%,v
%:: RCS/%
%:: SCCS/%
%:: %.c
%:: %.pl
%.o: %.c $(DIR_MAVIS)/token.h
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
%:: %.h
endif