Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d523c2b025
Fetching contributors…

Cannot retrieve contributors at this time

126 lines (100 sloc) 3.332 kb
## $Id$
# values from parrot_config
VERSION_DIR := @versiondir@
INCLUDE_DIR := @includedir@$(VERSION_DIR)
LIB_DIR := @libdir@$(VERSION_DIR)
SRC_DIR := @srcdir@$(VERSION_DIR)
TOOLS_DIR := @libdir@$(VERSION_DIR)/tools/lib
STAGING_DIR := ../../dynext
INSTALL_DIR := $(LIB_DIR)/languages/blizkost/dynext
# Set up extensions
LOAD_EXT := @load_ext@
O := @o@
# Setup some commands
PERL := @perl@
RM_F := @rm_f@
MKPATH := @mkpath@
CHMOD := @chmod@
CP := @cp@
CC := @cc@ -c
LD := @ld@
LDFLAGS := @ldflags@ @ld_debug@ @libs@
LD_LOAD_FLAGS := @ld_load_flags@
CFLAGS := @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ -I"$(P5_ARCHLIB)/CORE"
CC_OUT := @cc_o_out@
LD_OUT := @ld_out@
LIBPARROT := @inst_libparrot_ldflags@
LIBPERL := -lperl
#IF(darwin):LIBPERL := $(P5_ARCHLIB)/CORE/$(P5_LIBPERL)
#IF(win32):LIBPERL := $(P5_ARCHLIB)/CORE/$(P5_LIBPERL)
PMC2C_INCLUDES := --include $(SRC_DIR) --include $(SRC_DIR)/pmc
PMC2C := $(PERL) $(LIB_DIR)/tools/build/pmc2c.pl
PMC2CD := $(PMC2C) --dump $(PMC2C_INCLUDES)
PMC2CC := $(PMC2C) --c $(PMC2C_INCLUDES)
INCLUDES := -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/pmc
LINKARGS := $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) $(LIBPERL)
BLIZKOST_GROUP := blizkost_group
PMC_SOURCES := \
p5interpreter.pmc \
p5scalar.pmc \
p5array.pmc \
p5hash.pmc \
p5sub.pmc \
p5namespace.pmc
PMC_C := $(PMC_SOURCES:.pmc=.c)
OBJS := \
lib-$(BLIZKOST_GROUP)$(O) \
p5scalar$(O) \
p5array$(O) \
p5hash$(O) \
p5sub$(O) \
p5namespace$(O) \
p5interpreter$(O) \
CLEANUPS := \
"*$(LOAD_EXT)" \
"*$(O)" \
"*.c" \
"*.h" \
"*.dump" \
#IF(win32): "*.exp" \
#IF(win32): "*.ilk" \
#IF(win32): "*.manifext" \
#IF(win32): "*.pdb" \
#IF(win32): "*.lib" \
$(STAGING_DIR)/$(BLIZKOST_GROUP)$(LOAD_EXT)
all: staging
init_with_xs.h:
$(PERL) -MExtUtils::Embed -e xsinit -- -o init_with_xs.h
generate: init_with_xs.h $(PMC_SOURCES)
$(PMC2C) --no-lines --dump $(PMC2C_INCLUDES) $(PMC_SOURCES)
$(PMC2C) --no-lines --c $(PMC2C_INCLUDES) $(PMC_SOURCES)
$(PMC2C) --no-lines --library $(BLIZKOST_GROUP) --c $(PMC_SOURCES)
compile: generate
$(CC) $(CC_OUT)p5scalar$(O) $(INCLUDES) $(CFLAGS) p5scalar.c
$(CC) $(CC_OUT)p5array$(O) $(INCLUDES) $(CFLAGS) p5array.c
$(CC) $(CC_OUT)p5hash$(O) $(INCLUDES) $(CFLAGS) p5hash.c
$(CC) $(CC_OUT)p5sub$(O) $(INCLUDES) $(CFLAGS) p5sub.c
$(CC) $(CC_OUT)p5namespace$(O) $(INCLUDES) $(CFLAGS) p5namespace.c
$(CC) $(CC_OUT)p5interpreter$(O) $(INCLUDES) $(CFLAGS) p5interpreter.c
$(CC) $(CC_OUT)lib-$(BLIZKOST_GROUP)$(O) $(INCLUDES) $(CFLAGS) $(BLIZKOST_GROUP).c
linklibs: compile
$(LD) $(LD_OUT)$(BLIZKOST_GROUP)$(LOAD_EXT) $(OBJS) $(LINKARGS)
staging: linklibs
#IF(cygwin or hpux): CHMOD 0775 "*$(LOAD_EXT)"
$(CP) "*$(LOAD_EXT)" $(STAGING_DIR)
install:
#IF(cygwin or hpux): CHMOD 0775 "*$(LOAD_EXT)"
$(MKPATH) $(INSTALL_DIR)
$(CP) "*$(LOAD_EXT)" $(INSTALL_DIR)
uninstall:
$(RM_F) $(INSTALL_DIR)/$(BLIZKOST_GROUP)$(LOAD_EXT)
Makefile: ../../build/src/pmc/Makefile.in
cd ../.. && $(PERL) Configure.pl
clean:
$(RM_F) $(CLEANUPS)
realclean:
$(RM_F) $(CLEANUPS) Makefile
# Local variables:
# mode: makefile
# End:
# vim: ft=make:
Jump to Line
Something went wrong with that request. Please try again.