4
4
# You need GNU Make 3.71, gcc 2.5.7, emx 0.8h and GNU fileutils 3.9
5
5
# or similar tools. C++ interface and de.exe weren't tested.
6
6
#
7
- # Rename this file "Makefile".
8
- #
9
7
10
8
# Primary targets:
11
9
# gc.a - builds basic library
@@ -18,10 +16,11 @@ CC= gcc
18
16
CXX=g++
19
17
# Needed only for "make c++", which adds the c++ interface
20
18
21
- CFLAGS= -O -DALL_INTERIOR_POINTERS
19
+ CFLAGS= -O -DALL_INTERIOR_POINTERS -I$(srcdir)/include
22
20
# Setjmp_test may yield overly optimistic results when compiled
23
21
# without optimization.
24
22
23
+ CXXFLAGS= $(CFLAGS)
25
24
AR= ar
26
25
RANLIB= ar s
27
26
@@ -34,26 +33,22 @@ OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers
34
33
35
34
CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
36
35
37
- CORD_INCLUDE_FILES= $(srcdir)/gc.h $(srcdir)/include/cord.h \
36
+ CORD_INCLUDE_FILES= $(srcdir)/include/ gc.h $(srcdir)/include/cord.h \
38
37
$(srcdir)/include/ec.h $(srcdir)/include/cord_pos.h
39
38
40
39
# Libraries needed for curses applications. Only needed for de.
41
40
CURSES= -lcurses -ltermlib
42
41
43
- # The following is irrelevant on most systems. But a few
44
- # versions of make otherwise fork the shell specified in
45
- # the SHELL environment variable.
46
- SHELL= bash
47
-
48
- SPECIALCFLAGS =
42
+ SPECIALCFLAGS = -I$(srcdir)/include
49
43
# Alternative flags to the C compiler for mach_dep.c.
50
44
# Mach_dep.c often doesn't like optimization, and it's
51
45
# not time-critical anyway.
52
46
53
47
all: gc.a gctest.exe
54
48
55
- $(OBJS) test.o: $(srcdir)/gc_priv.h $(srcdir)/gc_hdrs.h $(srcdir)/gc.h \
56
- $(srcdir)/gcconfig.h $(srcdir)/gc_typed.h
49
+ $(OBJS) test.o: $(srcdir)/include/private/gc_priv.h \
50
+ $(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/gc.h \
51
+ $(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h
57
52
# The dependency on Makefile is needed. Changing
58
53
# options affects the size of GC_arrays,
59
54
# invalidating all .o files that rely on gc_priv.h
@@ -68,13 +63,12 @@ cords: $(CORD_OBJS) cord/cordtest.exe
68
63
$(AR) ru gc.a $(CORD_OBJS)
69
64
$(RANLIB) gc.a
70
65
71
- gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/gc_cpp.h
72
- $(CXX) -c -O $(srcdir)/gc_cpp.cc
66
+ gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/include/ gc_cpp.h
67
+ $(CXX) -c $(CXXFLAGS) $(srcdir)/gc_cpp.cc
73
68
74
- c++: gc_cpp.o $(srcdir)/gc_cpp.h
69
+ c++: gc_cpp.o $(srcdir)/include/ gc_cpp.h
75
70
$(AR) ru gc.a gc_cpp.o
76
71
$(RANLIB) gc.a
77
- cp $(srcdir)/gc_cpp.h include/gc_cpp.h
78
72
79
73
mach_dep.o: $(srcdir)/mach_dep.c
80
74
$(CC) -o mach_dep.o -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
@@ -109,7 +103,7 @@ gctest.exe: tests/test.o gc.a
109
103
# If an optimized setjmp_test generates a segmentation fault,
110
104
# odds are your compiler is broken. Gctest may still work.
111
105
# Try compiling setjmp_t.c unoptimized.
112
- setjmp_test.exe: $(srcdir)/tools/setjmp_t.c $(srcdir)/gc.h
106
+ setjmp_test.exe: $(srcdir)/tools/setjmp_t.c $(srcdir)/include/ gc.h
113
107
$(CC) $(CFLAGS) -o setjmp_test.exe $(srcdir)/tools/setjmp_t.c
114
108
115
109
test: setjmp_test.exe gctest.exe
0 commit comments