File: Makefile.noperl

package info (click to toggle)
yaskkserv 0.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 964 kB
  • ctags: 906
  • sloc: cpp: 11,838; perl: 670; sh: 191; makefile: 131
file content (104 lines) | stat: -rw-r--r-- 3,989 bytes parent folder | download | duplicates (3)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -*- Makefile -*-

.SUFFIXES			:
.PHONY				: all setup clean install_common_ install install_all install_simple install_normal install_hairy

PREFIX				:= /usr/local
CXXFLAGS_CONFIG			= -D YASKKSERV_VERSION=\"0.5.5\"
CXXFLAGS_CONFIG			+= -Os
# CXXFLAGS_CONFIG			+= -march=native
CXXFLAGS_CONFIG			+= -D YASKKSERV_ARCHITECTURE_BSD_CYGWIN_LINUX_GCC
CXXFLAGS_CONFIG			+= -D YASKKSERV_ARCHITECTURE_BYTE_ORDER_VAX
CXXFLAGS_CONFIG			+= -D YASKKSERV_CONFIG_ENABLE_SYSLOG
CXXFLAGS_CONFIG			+= -D YASKKSERV_CONFIG_ENABLE_ERROR_MESSAGE
CXXFLAGS_CONFIG			+= -D YASKKSERV_CONFIG_ENABLE_GOOGLE_JAPANESE_INPUT
CXXFLAGS_CONFIG			+= -D YASKKSERV_CONFIG_HEADER_HAVE_ICONV_H
ifneq (${shell uname}, Darwin)
CXXFLAGS_CONFIG			+= -D YASKKSERV_CONFIG_MACRO_HAVE_SYMBOL_MSG_NOSIGNAL
CXXFLAGS_CONFIG			+= -D YASKKSERV_CONFIG_FUNCTION_HAVE_TIMER_CREATE
endif

ARCHITECTURE_LOWER_CASE		:= bsd_cygwin_linux_gcc

INCLUDE_FLAGS			:= -I . -I source/skk -I source/skk/architecture -I source/skk/architecture/$(ARCHITECTURE_LOWER_CASE)
LIBRARY_FLAGS			:= -L/usr/lib
CXXFLAGS			:= $(INCLUDE_FLAGS) $(CXXFLAGS_CONFIG)
LDFLAGS				:= -lm -L/usr/lib
ifeq (${shell uname}, Darwin)
LDFLAGS				:= -liconv
else
LDFLAGS				:= -lrt
endif

CXX				:= g++
LD				:= $(CXX)
RM				:= rm
CP				:= cp
MKDIR				:= mkdir
INSTALL				:= install

SKKLIB_SOURCES			:= ${wildcard source/skk/architecture/$(ARCHITECTURE_LOWER_CASE)/*.cpp}
SKKLIB_OBJECTS			:= $(SKKLIB_SOURCES:.cpp=.o)
MAKE_DICTIONARY_SOURCES		:= ${wildcard source/yaskkserv_make_dictionary/*.cpp}
MAKE_DICTIONARY_OBJECTS		:= $(MAKE_DICTIONARY_SOURCES:.cpp=.o)
SIMPLE_SOURCES			:= ${wildcard source/yaskkserv_simple/*.cpp}
SIMPLE_OBJECTS			:= $(SIMPLE_SOURCES:.cpp=.o)
NORMAL_SOURCES			:= ${wildcard source/yaskkserv_normal/*.cpp}
NORMAL_OBJECTS			:= $(NORMAL_SOURCES:.cpp=.o)
HAIRY_SOURCES			:= ${wildcard source/yaskkserv_hairy/*.cpp}
HAIRY_OBJECTS			:= $(HAIRY_SOURCES:.cpp=.o)

OBJECTS				:= $(SKKLIB_OBJECTS) $(MAKE_DICTIONARY_OBJECTS) $(SIMPLE_OBJECTS) $(NORMAL_OBJECTS) $(HAIRY_OBJECTS)

TARGETS				:= source/yaskkserv_make_dictionary/yaskkserv_make_dictionary source/yaskkserv_simple/yaskkserv_simple source/yaskkserv_normal/yaskkserv_normal source/yaskkserv_hairy/yaskkserv_hairy

all				: setup $(TARGETS)

setup				:
	$(CP) -v source/skk/architecture/$(ARCHITECTURE_LOWER_CASE)/skk_gcc_precompile.h.in ./skk_gcc_precompile.h

clean				: 
	-$(RM) $(OBJECTS)
	-$(RM) $(TARGETS)
	-$(RM) ./skk_gcc_precompile.h

install_common_			:
	$(MKDIR) -p $(PREFIX)/bin
	$(INSTALL) source/yaskkserv_make_dictionary/yaskkserv_make_dictionary $(PREFIX)/bin/yaskkserv_make_dictionary

install				: install_normal

install_all			: install_common_
	$(MKDIR) -p $(PREFIX)/sbin
	$(INSTALL) source/yaskkserv_simple/yaskkserv_simple $(PREFIX)/sbin/yaskkserv_simple
	$(INSTALL) source/yaskkserv_normal/yaskkserv_normal $(PREFIX)/sbin/yaskkserv_normal
	$(INSTALL) source/yaskkserv_hairy/yaskkserv_hairy $(PREFIX)/sbin/yaskkserv_hairy

install_simple			: install_common_
	$(MKDIR) -p $(PREFIX)/sbin
	$(INSTALL) source/yaskkserv_simple/yaskkserv_simple $(PREFIX)/sbin/yaskkserv

install_normal			: install_common_
	$(MKDIR) -p $(PREFIX)/sbin
	$(INSTALL) source/yaskkserv_normal/yaskkserv_normal $(PREFIX)/sbin/yaskkserv

install_hairy			: install_common_
	$(MKDIR) -p $(PREFIX)/sbin
	$(INSTALL) source/yaskkserv_hairy/yaskkserv_hairy $(PREFIX)/sbin/yaskkserv

source/yaskkserv_make_dictionary/yaskkserv_make_dictionary	: skk $(MAKE_DICTIONARY_OBJECTS)
	$(LD) $(LDFLAGS) -o $@ ${wordlist 2, 99, $^} $(SKKLIB_OBJECTS)

source/yaskkserv_simple/yaskkserv_simple			: skk $(SIMPLE_OBJECTS)
	$(LD) $(LDFLAGS) -o $@ ${wordlist 2, 99, $^} $(SKKLIB_OBJECTS)

source/yaskkserv_normal/yaskkserv_normal			: skk $(NORMAL_OBJECTS)
	$(LD) $(LDFLAGS) -o $@ ${wordlist 2, 99, $^} $(SKKLIB_OBJECTS)

source/yaskkserv_hairy/yaskkserv_hairy				: skk $(HAIRY_OBJECTS)
	$(LD) $(LDFLAGS) -o $@ ${wordlist 2, 99, $^} $(SKKLIB_OBJECTS)

skk				: $(SKKLIB_OBJECTS)

$(OBJECTS)			: %.o : %.cpp
	$(CXX) $(CXXFLAGS) -c -o $@ $<