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

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

File I/O class - initial coding, not tested at all!

File size: 1.9 KB
Line 
1# $Id: makefile.gcc,v 1.6 2000-05-23 18:23:04 bird Exp $
2
3#
4# PD-Win32 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#
22PDWIN32_INCLUDE = ..\..\include
23PDWIN32_BIN = ..\..\bin\$(OBJDIR)
24PDWIN32_LIB = ..\..\lib
25PDWIN32_TOOLS = ..\bin
26PDWIN32_TCOMMON = ..\common
27!include $(PDWIN32_INCLUDE)\pdwin32.tools
28
29# Definitions for pdwin32.post
30LOCALCLEAN = 1
31CLEANEXTRAS = commongcc.*
32
33
34#
35# gcc defines
36#
37CC = gcc
38CXX = gcc
39LD = gcc
40!ifdef DEBUG
41OBJDIR = .\bin\debug
42!else
43OBJDIR = .\bin\release
44!endif
45
46
47!if $(OMF) == 0
48# aout version
49O = o
50LIB = a
51AR = ar
52CFZOMF =
53
54!else
55# OMF version
56O = gobj
57LIB = lib
58AR = emxomfar
59CFZOMF = -Zomf
60
61!endif
62
63
64CDEFINES = -D__WIN32OS2__ -D__WINE__
65CINCLUDES = -I$(PDWIN32_INCLUDE)\Win -I$(PDWIN32_INCLUDE)
66CPLUS_INCLUDE_PATH= $(CPLUS_INCLUDE_PATH);$(INCLUDE)
67
68# Note: Add -fhandle-exceptions if old gcc version (< 2.8.x?).
69!ifndef DEBUG
70CFLAGS = $(CFZOMF) -Wall -Zmap -Zmt -mprobe -Wall -s -O
71!else
72CFLAGS = $(CFZOMF) -Wall -Zmap -Zmt -mprobe -Wall -g
73!endif
74CXXFLAGS = $(CFLAGS)
75
76
77#
78# Interference rules
79#
80.c{$(OBJDIR)}.$(O):
81 $(CC) -c $(CFLAGS) $(CDEFINES) $(CINCLUDES) $< -o $@
82
83.cpp{$(OBJDIR)}.$(O):
84 $(CXX) -c $(CXXFLAGS) $(CDEFINES) $(CINCLUDES) $< -o $@
85
86
87#
88# Object files.
89#
90OBJS = \
91$(OBJDIR)\kFilePe.$(O) \
92$(OBJDIR)\kFileDef.$(O) \
93$(OBJDIR)\kFileLx.$(O) \
94$(OBJDIR)\kFileFormatBase.$(O)\
95$(OBJDIR)\kFile.$(O)
96
97
98#
99# All rule.
100#
101all: $(OBJDIR) \
102 commongcc.$(LIB)
103
104
105$(OBJDIR)\commongcc.$(LIB): $(OBJS)
106 $(RM) $@
107 $(AR) cr $@ $(OBJS)
108
109commongcc.$(LIB): $(OBJDIR)\commongcc.$(LIB)
110 $(CP) $** $@
111
112
113#
114# dependent rule. forward to main makefile.
115#
116dep:
117 @$(MAKE) /nologo -f makefile NODEP=1 dep
118
119
120# Includes the common rules.
121!include $(PDWIN32_INCLUDE)/pdwin32.post
122
Note: See TracBrowser for help on using the repository browser.