Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the build process (fperrad++). Also added pred/succ builtins …
…for better compatibility with 'joy' code.
- Loading branch information
Jarrod
committed
Mar 8, 2009
1 parent
33619ae
commit 44c4b1d
Showing
7 changed files
with
410 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
## $Id$ | ||
|
||
# values from parrot_config | ||
VERSION_DIR := @versiondir@ | ||
INCLUDE_DIR := @includedir@$(VERSION_DIR) | ||
LIB_DIR := @libdir@$(VERSION_DIR) | ||
STAGING_DIR := ../../dynext | ||
#STAGING_DIR := @build_dir@/runtime/parrot/dynext | ||
#INSTALL_DIR := $(LIB_DIR)/languages/fun/dynext | ||
INSTALL_DIR := $(LIB_DIR)/dynext | ||
|
||
# Set up extensions | ||
LOAD_EXT := @load_ext@ | ||
O := @o@ | ||
|
||
# Setup some commands | ||
PERL := @perl@ | ||
RM_F := @rm_f@ | ||
CHMOD := @chmod@ | ||
CP := @cp@ | ||
MKPATH := @mkpath@ | ||
CC := @cc@ -c | ||
LD := @ld@ | ||
LDFLAGS := @ldflags@ @ld_debug@ @rpath_blib@ @linkflags@ | ||
LD_LOAD_FLAGS := @ld_load_flags@ | ||
CFLAGS := @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ | ||
CC_OUT := @cc_o_out@ | ||
LD_OUT := @ld_out@ | ||
#IF(parrot_is_shared):LIBPARROT := @libparrot_ldflags@ | ||
#ELSE:LIBPARROT := | ||
|
||
OPS2C := $(PERL) $(LIB_DIR)/tools/build/ops2c.pl | ||
|
||
INCLUDES := -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/pmc | ||
LINKARGS := $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) | ||
|
||
OPS_FILE := fun.ops | ||
|
||
CLEANUPS := \ | ||
"*$(LOAD_EXT)" \ | ||
"*$(O)" \ | ||
"*.c" \ | ||
"*.h" \ | ||
"$(STAGING_DIR)/fun_ops*$(LOAD_EXT)" | ||
|
||
|
||
all: staging | ||
|
||
generate: $(OPS_FILE) | ||
$(OPS2C) C --dynamic $(OPS_FILE) | ||
$(OPS2C) CSwitch --dynamic $(OPS_FILE) | ||
#IF(cg_flag): $(OPS2C) CGoto --dynamic $(OPS_FILE) | ||
#IF(cg_flag): $(OPS2C) CGP --dynamic $(OPS_FILE) | ||
|
||
compile: generate | ||
$(CC) $(CC_OUT)fun_ops$(O) $(INCLUDES) $(CFLAGS) fun_ops.c | ||
$(CC) $(CC_OUT)fun_ops_switch$(O) $(INCLUDES) $(CFLAGS) fun_ops_switch.c | ||
#IF(cg_flag): $(CC) $(CC_OUT)fun_ops_cg$(O) $(INCLUDES) $(CFLAGS) fun_ops_cg.c | ||
#IF(cg_flag): $(CC) $(CC_OUT)fun_ops_cgp$(O) $(INCLUDES) $(CFLAGS) fun_ops_cgp.c | ||
|
||
linklibs: compile | ||
$(LD) $(LD_OUT)fun_ops$(LOAD_EXT) fun_ops$(O) $(LINKARGS) | ||
$(LD) $(LD_OUT)fun_ops_switch$(LOAD_EXT) fun_ops_switch$(O) $(LINKARGS) | ||
#IF(cg_flag): $(LD) $(LD_OUT)fun_ops_cg$(LOAD_EXT) fun_ops_cg$(O) $(LINKARGS) | ||
#IF(cg_flag): $(LD) $(LD_OUT)fun_ops_cgp$(LOAD_EXT) fun_ops_cgp$(O) $(LINKARGS) | ||
|
||
staging: linklibs | ||
#IF(cygwin or hpux): CHMOD 0775 "*$(LOAD_EXT)" | ||
$(MKPATH) $(STAGING_DIR) | ||
$(CP) "*$(LOAD_EXT)" $(STAGING_DIR) | ||
|
||
install: | ||
#IF(cygwin or hpux): CHMOD 0775 "*$(LOAD_EXT)" | ||
$(CP) "*$(LOAD_EXT)" $(INSTALL_DIR) | ||
|
||
uninstall: | ||
$(RM_F) "$(INSTALL_DIR)/fun_ops*$(LOAD_EXT)" | ||
|
||
Makefile: ../../config/makefiles/ops.in | ||
cd ../.. && $(PERL) Configure.pl | ||
|
||
clean: | ||
$(RM_F) $(CLEANUPS) | ||
|
||
realclean: | ||
$(RM_F) $(CLEANUPS) Makefile | ||
|
||
# Local variables: | ||
# mode: makefile | ||
# End: | ||
# vim: ft=make: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
## $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 | ||
#STAGING_DIR := @build_dir@/runtime/parrot/dynext | ||
#INSTALL_DIR := $(LIB_DIR)/languages/fun/dynext | ||
INSTALL_DIR := $(LIB_DIR)/dynext | ||
|
||
# Set up extensions | ||
LOAD_EXT := @load_ext@ | ||
O := @o@ | ||
|
||
# Setup some commands | ||
PERL := @perl@ | ||
RM_F := @rm_f@ | ||
CHMOD := @chmod@ | ||
CP := @cp@ | ||
MKPATH := @mkpath@ | ||
CC := @cc@ -c | ||
LD := @ld@ | ||
LDFLAGS := @ldflags@ @ld_debug@ | ||
LD_LOAD_FLAGS := @ld_load_flags@ | ||
CFLAGS := @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ | ||
CC_OUT := @cc_o_out@ | ||
LD_OUT := @ld_out@ | ||
#IF(parrot_is_shared):LIBPARROT := @libparrot_ldflags@ | ||
#ELSE:LIBPARROT := | ||
|
||
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) | ||
|
||
FUN_GROUP := fun_group | ||
|
||
PMC_SOURCES := \ | ||
list.pmc \ | ||
delayedsub.pmc \ | ||
char.pmc \ | ||
eosmarker.pmc | ||
|
||
OBJS := \ | ||
lib-$(FUN_GROUP)$(O) \ | ||
list$(O) \ | ||
delayedsub$(O) \ | ||
char$(O) \ | ||
eosmarker$(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)/$(FUN_GROUP)$(LOAD_EXT) | ||
|
||
|
||
all: staging | ||
|
||
generate: $(PMC_SOURCES) | ||
$(PMC2CD) list.pmc | ||
$(PMC2CD) delayedsub.pmc | ||
$(PMC2CD) char.pmc | ||
$(PMC2CD) eosmarker.pmc | ||
$(PMC2CC) list.pmc | ||
$(PMC2CC) delayedsub.pmc | ||
$(PMC2CC) char.pmc | ||
$(PMC2CC) eosmarker.pmc | ||
$(PMC2C) --library $(FUN_GROUP) --c $(PMC_SOURCES) | ||
|
||
compile: generate | ||
$(CC) $(CC_OUT)list$(O) $(INCLUDES) $(CFLAGS) list.c | ||
$(CC) $(CC_OUT)delayedsub$(O) $(INCLUDES) $(CFLAGS) delayedsub.c | ||
$(CC) $(CC_OUT)char$(O) $(INCLUDES) $(CFLAGS) char.c | ||
$(CC) $(CC_OUT)eosmarker$(O) $(INCLUDES) $(CFLAGS) eosmarker.c | ||
$(CC) $(CC_OUT)lib-$(FUN_GROUP)$(O) $(INCLUDES) $(CFLAGS) $(FUN_GROUP).c | ||
|
||
linklibs: compile | ||
$(LD) $(LD_OUT)$(FUN_GROUP)$(LOAD_EXT) $(OBJS) $(LINKARGS) | ||
|
||
staging: linklibs | ||
#IF(cygwin or hpux): CHMOD 0775 "*$(LOAD_EXT)" | ||
$(MKPATH) $(STAGING_DIR) | ||
$(CP) "*$(LOAD_EXT)" $(STAGING_DIR) | ||
|
||
install: | ||
#IF(cygwin or hpux): CHMOD 0775 "*$(LOAD_EXT)" | ||
$(CP) "*$(LOAD_EXT)" $(INSTALL_DIR) | ||
|
||
uninstall: | ||
$(RM_F) $(INSTALL_DIR)/$(FUN_GROUP)$(LOAD_EXT) | ||
|
||
Makefile: ../../config/makefiles/pmc.in | ||
cd ../.. && $(PERL) Configure.pl | ||
|
||
clean: | ||
$(RM_F) $(CLEANUPS) | ||
|
||
realclean: | ||
$(RM_F) $(CLEANUPS) Makefile | ||
|
||
# Local variables: | ||
# mode: makefile | ||
# End: | ||
# vim: ft=make: | ||
|
Oops, something went wrong.