Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
#
2
# Rules and common variables
3
#
4
 
5
HOSTNAME=$(shell uname)
6
 
7
ifeq ($(HOSTNAME),Linux)
8
else
9
ifeq ($(HOSTNAME),MS-DOS)
10
else
11
all::
12
	@echo System "$(HOSTNAME)" unknow
13
	@error
14
endif
15
endif
16
 
17
#
18
#
19
#
20
 
21
LIBNAME      = stdio
22
 
23
#
24
INCLUDE_PATH = $(HARTIK)/h
25
LIB_PATH     = $(HARTIK)/lib
26
 
27
CC           = gcc
28
 
29
C_INC_TOREMOVE = -I$(HARTIK)/h -I$(HARTIK)/h/sys -I$(HARTIK)/h/x86
30
C_DEF_TOREMOVE = -D__GNU__
31
 
32
C_DEF        = -D_PARANOIA -D_GNU_SOURCE $(C_DEF_TOREMOVE) -Di386
33
C_WARN       = -Wimplicit-function-declaration -Wall
34
C_FLAGS      = -O -finline-functions -fno-builtin -nostdinc
35
C_INC        = -I. \
36
	-I../include -I../../include \
37
	-I$(HARTIK)/include -I$(HARTIK) $(C_INC_TOREMOVE)
38
#C_MAC        = -imacros $(HARTIK)/include/hartik/bdevconf.h
39
C_MAC        =
40
C_OPT        = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS)
41
C_OUTPUT     = -o $(notdir $*.o)
42
 
43
ASM_DEF      =
44
ASM_WARN     =
45
ASM_FLAGS    =
46
ASM_INC      = -I. -I$(HARTIK)/include
47
ASM_MAC      =
48
ASM_OPT      = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS)
49
ASM_OUTPUT   = -o $*.o
50
 
51
 
52
%.o : %.c
53
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $<
54
 
55
%.o : %.S
56
	$(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $<