source: trunk/tools/common/makefile.gcc@ 4712

Last change on this file since 4712 was 4712, checked in by bird, 25 years ago

New makefile style.

File size: 1.9 KB
Line 
1# $Id: makefile.gcc,v 1.8 2000-12-02 23:26:58 bird Exp $
2
3#
4# Odin32 API
5#
6# Tools common library, GCC version.
7#
8#
9
10
11#
12# If OMF flag isn't set, set it to default value.
13#
14!ifndef OMF
15OMF=0
16!endif
17
18
19#
20# Directories and common tools.
21#
22ODIN32_INCLUDE = ..\..\include
23ODIN32_BIN = ..\..\bin\$(OBJDIR)
24ODIN32_LIB = ..\..\lib
25ODIN32_TOOLS = ..\bin
26ODIN32_TCOMMON = ..\common
27!include $(ODIN32_INCLUDE)\odin32.tools
28
29# Definitions for odin32.post
30LOCALCLEAN = 1
31CLEANEXTRAS = commongcc.*
32OLD_STYLE = 1
33
34
35#
36# gcc defines
37#
38CC = gcc
39CXX = gcc
40LD = gcc
41!ifdef DEBUG
42OBJDIR = .\bin\debug
43!else
44OBJDIR = .\bin\release
45!endif
46
47
48!if $(OMF) == 0
49# aout version
50O = o
51LIB = a
52AR = ar
53CFZOMF =
54
55!else
56# OMF version
57O = gobj
58LIB = lib
59AR = emxomfar
60CFZOMF = -Zomf
61
62!endif
63
64
65CDEFINES = -D__WIN32OS2__ -D__WINE__
66CINCLUDES = -I$(ODIN32_INCLUDE)\Win -I$(ODIN32_INCLUDE)
67CPLUS_INCLUDE_PATH= $(CPLUS_INCLUDE_PATH);$(INCLUDE)
68
69# Note: Add -fhandle-exceptions if old gcc version (< 2.8.x?).
70!ifndef DEBUG
71CFLAGS = $(CFZOMF) -Wall -Zmap -Zmt -mprobe -Wall -s -O
72!else
73CFLAGS = $(CFZOMF) -Wall -Zmap -Zmt -mprobe -Wall -g
74!endif
75CXXFLAGS = $(CFLAGS)
76
77
78#
79# Interference rules
80#
81.c{$(OBJDIR)}.$(O):
82 $(CC) -c $(CFLAGS) $(CDEFINES) $(CINCLUDES) $< -o $@
83
84.cpp{$(OBJDIR)}.$(O):
85 $(CXX) -c $(CXXFLAGS) $(CDEFINES) $(CINCLUDES) $< -o $@
86
87
88#
89# Object files.
90#
91OBJS = \
92$(OBJDIR)\kFilePe.$(O) \
93$(OBJDIR)\kFileDef.$(O) \
94$(OBJDIR)\kFileLx.$(O) \
95$(OBJDIR)\kFileFormatBase.$(O)\
96$(OBJDIR)\kFile.$(O)
97
98
99#
100# All rule.
101#
102all: $(OBJDIR) \
103 commongcc.$(LIB)
104
105
106$(OBJDIR)\commongcc.$(LIB): $(OBJS)
107 $(RM) $@
108 $(AR) cr $@ $(OBJS)
109
110commongcc.$(LIB): $(OBJDIR)\commongcc.$(LIB)
111 $(CP) $** $@
112
113
114#
115# dependent rule. forward to main makefile.
116#
117dep:
118 @$(MAKE) /nologo -f makefile NODEP=1 dep
119
120
121# Includes the common rules.
122!error "this makefile doesn't work right now."
123!include $(ODIN32_INCLUDE)/odin32.post
124
Note: See TracBrowser for help on using the repository browser.