2 # Time-stamp: <2002-06-24 14:13:27 gildea>
14 #LDFLAGS = -debug -map -dll -incremental:no
21 CC
= gcc
-fpic
$(CFLAGS
)
22 DEBUG
=-g
-Wall
-Wno-char-subscripts
-O
34 LOCAL_LDFLAGS
= -shared
$(LDFLAGS
)
35 DEBUG
=-g
-O
-Wall
-Wno-unused-function
40 #PLATFORM_FEATURES = -DUSE_STRLWR=0
49 #LOCAL_LDFLAGS = -G -Bsymbolic -z text $(LDFLAGS)
53 FEATURES
= $(PLATFORM_FEATURES
) -DUSE_DL
=1 -DUSE_MATH
=0 -DUSE_ASCII_NAMES
=0
55 OBJS
= klink.
$(Osuf
) dynload.
$(Osuf
)
57 LIBTARGET
= $(LIBPREFIX
)klink.
$(SOsuf
)
58 STATICLIBTARGET
= $(LIBPREFIX
)klink.
$(LIBsuf
)
59 RGSTRBLS
= registerables
/ground.inc registerables
/unsafe.inc \
60 registerables
/simple.inc registerables
/type-keys.inc \
61 registerables
/all-builtins.inc
63 all: $(LIBTARGET
) $(STATICLIBTARGET
) klink
$(EXE_EXT
)
66 $(CC
) -I.
-c
$(DEBUG
) $(FEATURES
) $(DL_FLAGS
) $<
69 $(LD
) $(LOCAL_LDFLAGS
) $(OUT
) $(OBJS
) $(SYS_LIBS
)
71 klink
$(EXE_EXT
): $(OBJS
)
72 $(CC
) -o
$@
$(DEBUG
) $(OBJS
) $(SYS_LIBS
)
74 $(STATICLIBTARGET
): $(OBJS
)
77 $(OBJS
): klink.h klink-private.h
$(RGSTRBLS
)
78 dynload.
$(Osuf
): dynload.h
81 $(RM
) $(OBJS
) $(LIBTARGET
) $(STATICLIBTARGET
) klink
$(EXE_EXT
)
82 $(RM
) klink.ilk klink.map klink.pdb klink.lib klink.exp
85 TAGS_SRCS
= klink.h klink.c dynload.h dynload.c
92 gcc
-DCOLLECT_RGSTRS
-E
$*.c \
93 | sed
's/_K_END_RGSTR/_K_END_RGSTR\n/' \
94 | grep
--only-matching
--no-filename
"_K_RGSTR.*_K_END_RGSTR" \
95 | sed
's/_K_RGSTR *\(.*\)_K_END_RGSTR/\1/' \
100 | grep
--no-filename
"^$*:" \
101 | cut
--delimiter
=":" -f
2- \
102 > registerables
/$*.inc
104 ##Explicitly give each inclusion's dependencies.
105 registerables
/ground.inc
: klink.reg
106 registerables
/unsafe.inc
: klink.reg
107 registerables
/simple.inc
: klink.reg
108 registerables
/type-keys.inc
: klink.reg
109 registerables
/all-builtins.inc
: klink.reg