Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
easea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Arnaud Kress
easea
Commits
7e904c5d
Commit
7e904c5d
authored
Apr 27, 2009
by
maitre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using static library (exe could be placed in /usr/bin), std_mo (dual
objective)
parent
a49c8888
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1780 additions
and
6 deletions
+1780
-6
Easea.h
Easea.h
+7
-0
EaseaLex.l
EaseaLex.l
+4
-1
EaseaParse.y
EaseaParse.y
+9
-2
alexyacc/makefile
alexyacc/makefile
+5
-0
makefile
makefile
+36
-3
tpl/STD_MO.tpl
tpl/STD_MO.tpl
+1719
-0
No files found.
Easea.h
View file @
7e904c5d
...
...
@@ -23,6 +23,12 @@ Centre de Math
#define DREAM 3
#define CUDA 4
#define STD 5
#define STD_FLAVOR_SO 0
#define STD_FLAVOR_MO 1
#define CUDA_FLAVOR_SO 0
#define CUDA_FLAVOR_MO 0
#define UNIX 1
#define WINDOWS 2
#define UNKNOWN_OS 3
...
...
@@ -46,6 +52,7 @@ extern char sMIG_SEL[], sMIGRATOR[], sIMMIG_SEL[],sMIG_TARGET_SELECTOR[];
extern
int
nWARNINGS
,
nERRORS
;
extern
int
TARGET
,
OPERATING_SYSTEM
;
extern
int
TARGET_FLAVOR
;
// Prototypes
extern
int
mystricmp
(
char
*
,
char
*
);
EaseaLex.l
View file @
7e904c5d
...
...
@@ -1820,7 +1820,10 @@ int CEASEALexer::create(CEASEAParser* pParser, CSymbolTable* pSymTable)
} }
if (TARGET==STD){
strcat(sTemp,"STD.tpl");
if(TARGET_FLAVOR == STD_FLAVOR_SO)
strcat(sTemp,"STD.tpl");
else
strcat(sTemp,"STD_MO.tpl");
if (!(yyin = fpTemplateFile = fopen(sTemp, "r"))){
fprintf(stderr,"\n*** Could not open %s.\n",sTemp);
fprintf(stderr,"*** Please modify the EZ_PATH environment variable.\n");
...
...
EaseaParse.y
View file @
7e904c5d
...
...
@@ -24,7 +24,7 @@ char sLOWER_CASE_PROJECT_NAME[1000];
char sEZ_FILE_NAME[1000];
char sEO_DIR[1000];
char sEZ_PATH[1000];
int TARGET;
int TARGET
,TARGET_FLAVOR
;
int OPERATING_SYSTEM;
int nWARNINGS=0;
int nERRORS=0;
...
...
@@ -1327,7 +1327,14 @@ int main(int argc, char *argv[]){
else if (!mystricmp(sTemp,"galib")) TARGET=GALIB;
else if (!mystricmp(sTemp,"dream")) TARGET=DREAM;
else if (!mystricmp(sTemp,"cuda")) TARGET=CUDA;
else if (!mystricmp(sTemp,"std")) TARGET=STD;
else if (!mystricmp(sTemp,"std")) {
TARGET=STD;
TARGET_FLAVOR = STD_FLAVOR_SO;
}
else if (!mystricmp(sTemp,"std_mo")) {
TARGET=STD;
TARGET_FLAVOR = STD_FLAVOR_MO;
}
else if (!mystricmp(sTemp,"v")) bVERBOSE=true;
else if (!mystricmp(sTemp,"path")) {
if (argv[++nParamNb][0]=='"') {
...
...
alexyacc/makefile
View file @
7e904c5d
...
...
@@ -10,6 +10,11 @@ yycunput.o yycuoflw.o yycwipe.o yycwork.o yycwrap.o
CPPC
=
g++
CPPFLAGS
=
-Iinclude
/
LIB_NAME
=
libalex.so
STATIC_LIB_NAME
=
libalex.a
$(STATIC_LIB_NAME)
:
$(OBJS)
ar
-r
$@
$(OBJS)
&&
ranlib
$@
$(LIB_NAME)
:
$(OBJS)
$(CPPC)
-shared
-o
$@
$^
...
...
makefile
View file @
7e904c5d
...
...
@@ -4,12 +4,41 @@ CPPC = g++
LDFLAGS
=
$(EXEC)
:
EaseaSym.o EaseaParse.o EaseaLex.o alexyacc/libalex.so
$(EXEC)
:
EaseaSym.o EaseaParse.o EaseaLex.o alexyacc/libalex.a
$(CPPC)
$(CPPFLAGS)
$(LDFLAGS)
$^
-o
$@
#
# Congratulations ! It looks like you compiled EASEA successfully.
#
# Generated files depend on libboost-program-options,
# be sure that the development version of this library
# is installed on you system :
# For example, on ubuntu :
# sudo apt-get install libboost-program-options-dev
#
# Easea could be moved to a bin directory or included in the PATH
# as long as users have defined a EZ_PATH environment variable
# pointing to the tpl/ directory.
# To do this temporarly type :
# export EZ_PATH=`pwd`/tpl/
# Or define EZ_PATH in your bashrc file
(
for
bash
users
)
:
# For example :
# export EZ_PATH=/path/to/easea/directory/tpl/
#
# Otherwise you can use easea from this directory by typing :
# For example :
# ./easea examples/weierstrass/weierstrass.ez
# Go to the taget directory and type make
#
# Thanks for using EASEA.
#
# $(EXEC):EaseaSym.o EaseaParse.o EaseaLex.o alexyacc/libalex.so
# $(CPPC) $(CPPFLAGS) $(LDFLAGS) $^ -o $@
$(EXEC)_bin
:
EaseaSym.o EaseaParse.o EaseaLex.o
$(CPPC)
$(CPPFLAGS)
$(LDFLAGS)
$^
-o
$@
-lalex
#
$(EXEC)_bin:EaseaSym.o EaseaParse.o EaseaLex.o
#
$(CPPC) $(CPPFLAGS) $(LDFLAGS) $^ -o $@ -lalex
...
...
@@ -23,6 +52,10 @@ EaseaParse.o: EaseaParse.cpp EaseaLex.cpp
alexyacc/libalex.so
:
alexyacc/*.cpp
cd
alexyacc
&&
make libalex.so
alexyacc/libalex.a
:
alexyacc/*.cpp
cd
alexyacc
&&
make libalex.a
clean
:
rm
-f
*
.o
$(EXEC)
$(EXEC)
_bin
cd
alexyacc
&&
make clean
...
...
tpl/STD_MO.tpl
0 → 100644
View file @
7e904c5d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment