Community
cancel
Showing results for 
Search instead for 
Did you mean: 
1234
Beginner
311 Views

How to revise the Linux Makefile for using it on Windows

 

 

 

Hi, Intel Compiler IT support guys,

I have been using Intel c/C++/Fortran compiler.  Under Linux, I use icl compiler to generate a static library of Scotch graph C code application.

Here is the makefile and under linux there is no problem and the static library is generated. but I want to generate a static library under Windows, could you tell me how to  revise this makefile so that it can be used on windows by the intel C compiler icl? I tried to do it several times but I failed. I look forward to your help and reply. Your reply will be highly appreciated.

 

My makefile used on Linux platform  is attached and please see it for details.

 

 

 

 

 

 

 

 

 

0 Kudos
9 Replies
1234
Beginner
307 Views

the file attached is the revised makefile I used on Windows.  Is there something wrong with it? Please tell me your ideas. thanks in advance.

GouthamK_Intel
Moderator
293 Views

Hi,

Could you please let us know what are errors you are facing while using Windows Makefile?

Also, please share the source code and error logs so that it will help us to investigate more.


Regards

Goutham


1234
Beginner
291 Views

Thanks indeed for your reply.

 On Windows platform, the makefile syntax is different from it on Linux. I revised the makefile used on Linux so that it is able to run on windows via nmake command. the following error occurred and  please see it:

D:\scotch_6.0.10wgraph2\src\libscotch>nmake

Microsoft (R) Program Maintenance Utility Version 14.16.27032.1
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1073: don't know how to make '%.c'
Stop.

my revised makefile used on Windows is attached and please see it for details.

.........

CCS = icl
CFLAGS = /O3 /DCOMMON_RANDOM_FIXED_SEED /DIDXSIZE64

...............

%$(OBJ) : %.c
$(CCS) $(CFLAGS) $(CLIBFLAGS) /c $(<) /Fo $(@) /DSCOTCH_VERSION_NUM=$(VERSION) /DSCOTCH_RELEASE_NUM=$(RELEASE) /DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL)

%$(EXE) : %.c
$(CCS) $(CFLAGS) /DSCOTCH_VERSION_NUM=$(VERSION) /DSCOTCH_RELEASE_NUM=$(RELEASE) /DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL) $(<) /Fe $(@) $(LDFLAGS)

 

%.c is not recognized in the makefile on Windows.

 

Could you tell me if there is any error in my makefile_win? what's difference in syntax between Linux Makefile and Windows Makefile?  I look forward to hearing from you again.

 

Thanks again and have a good day,

 

 

 

 

 

 

 

 

 

 

GouthamK_Intel
Moderator
272 Views

Hi,

Could you please provide source code or the link from where I can download the code so that we can investigate more on the issue you are facing.


Regards

Goutham


1234
Beginner
264 Views

OK. No problem.

 

 

1234
Beginner
258 Views

Hi, Goutham,

Thanks indeed for your reply.

I partition the source codes into 3 parts due to its size exceeding the maximum size allowed. All theses 3 files are attached.  Please use 7-Zip to uncompress these 3 *.zip files on Windows and them merge all files into one directory on both Linux and Windows. Then you may run ' make' to see it works well under Linux. On Windows you may use the Makefile_win uploaded in last reply to run 'nmake' to see it does not work well.

I look forward to your help and your help is really appreciated.

Have a good day,

Best regards,

Dingjun

 

1234
Beginner
253 Views

Hi, again, Goutham,

Please also install flex and bison under Linux and win_flex and win_bison on windows in order to run 'make' or 'nmake' command. these are free software and you may download them on the website googled.

Thanks again,

Dingjun

 

GouthamK_Intel
Moderator
225 Views

Hi,

Thanks for providing the source code!

Since this forum is for Intel Compiler related issues and looks like your issue is related to Makefile migration.

Therefore, we are making this thread as a community so that others can help you regarding this issue.

 

Also, please refer to the below example where both Linux Makefile and Windows Makefile exist for the same application.

https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/DPC%2B%2B/DenseLinearAlge...

Intel will no longer respond to this thread.

Please raise a new thread for any further assistance from Intel.

Have a Good day!

 

Regards

Goutham

RahulV_intel
Moderator
203 Views

Intel will no longer monitor this thread. However, this thread will remain open for community members to participate.