1: #
2: # ----------------------------------------------------------------------
3: # T-Kernel 2.0 Software Package
4: #
5: # Copyright 2011 by Ken Sakamura.
6: # This software is distributed under the latest version of T-License 2.x.
7: # ----------------------------------------------------------------------
8: #
9: # Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17.
10: # Modified by T-Engine Forum at 2013/03/28.
11: # Modified by TRON Forum(http://www.tron.org/) at 2015/06/01.
12: #
13: # ----------------------------------------------------------------------
14: #
15:
16: #
17: # Makefile for gmake
18: # libsys - T-Kernel system internal library (common description)
19: #
20:
21: # source file dependencies (generated automatically)
22: DEPS = Dependencies
23: DEPENDENCIES_OUTPUT := $(DEPS)
24:
25: # ----------------------------------------------------------------------------
26:
27: # target file
28: TARGET = libsys.a
29:
30: # source file path
31: S = ../../src
32: VPATH = $(S) $(S)/sysdepend/$(MACHINE)
33: HEADER += $(S) $(S)/sysdepend/$(MACHINE)
34:
35: # source files
36: SRC += bitclr.c bitnot.c bitsclr.c bitsearch0.c bitsearch1.c \
37: bitset.c bitsset.c bittest.c \
38: quesearch.c quesearchge.c quesearchgeu.c quesearchgt.c \
39: quesearchgtub.c quesearchh.c quesearchne.c \
40: quesearchneh.c quesearchrevltu.c \
41: syslog.c setlogmask.c logmask.c
42:
43: OBJ = $(addsuffix .o, $(basename $(notdir $(SRC))))
44:
45: # compiler options
46: CFLAGS += $(CFLAGS_WARNING)
47:
48: # ----------------------------------------------------------------------------
49:
50: .PHONY: all clean install clean_install
51:
52: ALL = $(TARGET)
53:
54: all: $(ALL)
55:
56: $(TARGET): $(OBJ)
57: $(AR) $(ARFLAGS) $@ $?
58: ifdef RANLIB
59: $(RANLIB) $@
60: endif
61:
62: install: $(TARGET:%=$(LIB_INSTALLDIR)/%)
63:
64: clean:
65: $(RM) $(OBJ) $(ALL) $(DEPS)
66:
67: clean_install:
68: $(RM) $(TARGET:%=$(LIB_INSTALLDIR)/%)
69:
70: # generate dependencies
71: ifdef DEPENDENCIES_OUTPUT
72: $(DEPS): ; touch $(DEPS)
73: else
74: $(DEPS): $(SRC) ; $(MAKEDEPS) $@ $?
75: endif
76: -include $(DEPS)