Skip to content

Commit

Permalink
Add src/pmc/Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Mar 21, 2009
1 parent 94219f4 commit 2f40642
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 14 deletions.
1 change: 1 addition & 0 deletions Configure.pl
Expand Up @@ -76,6 +76,7 @@ END
create_files(
\%config,
{ 'build/templates/Makefile.in' => 'Makefile',
'build/templates/src/pmc/Makefile.in' => 'src/pmc/Makefile',
}
);

Expand Down
26 changes: 12 additions & 14 deletions build/templates/Makefile.in
@@ -1,35 +1,33 @@
# Copyright (C) 2007-2009, The Perl Foundation.

# Makefile for languages/eclectus

# configuration settings
BUILD_DIR = @build_dir@
LOAD_EXT = @load_ext@
O = @o@
BUILD_DIR := @build_dir@
LOAD_EXT := @load_ext@
O := @o@

# Set up commands
PARROT = ../../parrot@exe@
PERL = @perl@
RM_F = @rm_f@
BUILD_DYNPMC = $(PERL) @build_dir@/tools/build/dynpmc.pl
PARROT := ../../parrot@exe@
PERL := @perl@
RM_F := @rm_f@
BUILD_DYNPMC := $(PERL) @build_dir@/tools/build/dynpmc.pl
#IF(darwin):
#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@

# Set up directories
PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext
PMC_DIR = src/pmc
PARROT_DYNEXT := @build_dir@/runtime/parrot/dynext
PMC_DIR := src/pmc

ECLECTUS_GROUP = $(PMC_DIR)/eclectus_group@load_ext@
PMCS = \
ECLECTUS_GROUP := $(PMC_DIR)/eclectus_group@load_ext@
PMCS := \
eclectusboolean \
eclectuscharacter \
eclectusemptylist \
eclectusfixnum \
eclectuspair \
eclectusstring \
eclectusvector
PMC_SOURCES = \
PMC_SOURCES := \
$(PMC_DIR)/eclectusboolean.pmc \
$(PMC_DIR)/eclectuscharacter.pmc \
$(PMC_DIR)/eclectusemptylist.pmc \
Expand Down
76 changes: 76 additions & 0 deletions build/templates/src/pmc/Makefile.in
@@ -0,0 +1,76 @@
# Build the PMCs for Pipp.

# Set up commands
PERL := @perl@
CP := @cp@
RM_F := @rm_f@
PMCBUILD := $(PERL) @build_dir@/tools/build/dynpmc.pl
CC := @cc@
CFLAGS := @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@

# Set up directories
BUILD_DIR := @build_dir@
INCLUDE_DIR := $(BUILD_DIR)/include
DYNEXT_DIR := ../../dynext
VERSION_DIR := @versiondir@
LIB_DIR := @libdir@$(VERSION_DIR)
INSTALL_DIR := $(LIB_DIR)/dynext

# Set up extensions
LOAD_EXT := @load_ext@
O := @o@

PIPP_GROUP := $(DYNEXT_DIR)/pipp_group$(LOAD_EXT)

PMCS := \
php \
phparray \
phpboolean \
phpfloat \
phpinteger \
phpresource \
phpstring \
phpnull

PMC_SOURCES := \
php.pmc \
phparray.pmc \
phpboolean.pmc \
phpfloat.pmc \
phpinteger.pmc \
phpresource.pmc \
phpstring.pmc \
phpnull.pmc


# default
build: $(PIPP_GROUP)


# This is a listing of all targets, that are meant to be called by users
help:
@echo ""
@echo "Following targets are available for the user:"
@echo ""
@echo "Building:"
@echo " build: Build the PMCs."
@echo " This is the default."
@echo ""
@echo "Cleaning:"
@echo " clean: Clean up."
@echo ""

$(PIPP_GROUP): $(PMC_SOURCES)
$(PMCBUILD) generate $(PMCS)
$(PMCBUILD) compile $(PMCS)
$(PMCBUILD) linklibs $(PMCS)
$(PMCBUILD) copy "--destination=$(DYNEXT_DIR)" $(PMCS)

install:
#IF(cygwin or hpux): CHMOD 0775 "*$(LOAD_EXT)"
$(CP) "*$(LOAD_EXT)" $(INSTALL_DIR)

# cleaning up
clean:
$(RM_F) "*dump" "php*.c" "pmc_*h" "pipp_group.h" "*$(O)" "*$(LOAD_EXT)"

0 comments on commit 2f40642

Please sign in to comment.