今天在本地看到一个lsd_1.6的源文件,不知道什么时候看LSD时下载的,里面只有一个Makefile和源文件。

想到在Linux下可以只用一个make命令就可以得到可执行程序,在Windows下是不是以可以一个命令就得到EXE程序呢,想到了nmake。

原来的Makefile是这样写的:

 1 # -----------------------------------------------------------------------------
 2 #
 3 # LSD - Line Segment Detector on digital images
 4 #
 5 # Copyright (c) 2007-2011 rafael grompone von gioi <grompone@gmail.com>
 6 #
 7 # This program is free software: you can redistribute it and/or modify
 8 # it under the terms of the GNU Affero General Public License as
 9 # published by the Free Software Foundation, either version 3 of the
10 # License, or (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Affero General Public License for more details.
16 #
17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #
20 # -----------------------------------------------------------------------------
21 
22 all: lsd lsd_call_example
23 
24 lsd: lsd.c lsd.h lsd_cmd.c
25     cc -O3 -o lsd lsd_cmd.c lsd.c -lm
26 
27 lsd_call_example: lsd.c lsd.h lsd_call_example.c
28     cc -o lsd_call_example lsd_call_example.c lsd.c -lm
29 
30 doc: lsd.c lsd.h doxygen.config
31     doxygen doxygen.config
32 
33 clean:
34     rm -f lsd lsd_call_example
35 
36 cleandoc:
37     rm -rf doc
38 
39 # -----------------------------------------------------------------------------
View Code

相关文章:

  • 2022-12-23
  • 2021-11-09
  • 2022-02-07
  • 2021-05-16
  • 2022-12-23
  • 2021-08-11
  • 2021-05-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2021-11-20
  • 2022-01-15
相关资源
相似解决方案