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

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

Updated makefiles to be more comform with the new makefile style.

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