Skip to content

Commit f064f69

Browse files
committed
improved makefiles
1 parent 3893051 commit f064f69

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
*.db
3434

3535
# Others
36-
Makefile
3736
bin/
3837
lib/
3938
obj/

endecmd/Makefile

+21-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
GCC=gcc
44
GPP=g++
55

6-
TARGET=endecmd
7-
LFLAGS+=-O2 -s
8-
LFLAGS+=-static -mtune=native -lpthread
6+
TARGET = endecmd
7+
LFLAGS += -O2
8+
LFLAGS += -mtune=native -lpthread
99

1010
DIRSRC=src
1111
DIRINC=src
@@ -18,6 +18,24 @@ CFLAGS+=-I${DIRLEDT}
1818
LFLAGS+=-L${DIRLEDT}
1919
LFLAGS+=-lendetool
2020

21+
# Automatic detecting architecture.
22+
KRNL := $(shell uname -s)
23+
KVER := $(shell uname -r | cut -d . -f1)
24+
ARCH := $(shell uname -m)
25+
26+
ifeq ($(KRNL),Darwin)
27+
ifeq ($(shell test $(KVER) -gt 19; echo $$?),0)
28+
CFLAGS += -arch x86_64 -arch arm64
29+
endif
30+
else
31+
SUBSYS := $(shell uname | grep -q ^MINGW)
32+
ifeq ($(SUBSYS),MINGW)
33+
LFLAGS += -mwindows -static -s
34+
else
35+
LFLAGS += -s
36+
endif
37+
endif
38+
2139
SRCS=$(wildcard ${DIRSRC}/*.cpp)
2240
OBJS=$(SRCS:${DIRSRC}/%.cpp=${DIROBJ}/%.o)
2341

endecmd/src/main.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using namespace std;
2222

2323
string me_path;
2424
string me_name;
25-
string me_version = "0.2.5.12";
25+
string me_version = "0.2.5.13";
2626
string ende_key;
2727
string ende_data;
2828
string ende_file_src;
@@ -190,7 +190,7 @@ void printAbout()
190190
me_name.c_str(),
191191
TARGET_PF,
192192
me_version.c_str() );
193-
printf( "(C)Copyrighted 2013 - 2018 Raphael Kim\n" );
193+
printf( "(C)Copyrighted 2013 - 2021 Raphael Kim\n" );
194194
printf( "\n" );
195195
}
196196
}
@@ -199,7 +199,7 @@ void printArgsHelp()
199199
{
200200
if ( opt_verbose_off == false )
201201
{
202-
printf( "\tusage : %s [ options ] ( string or source filename ) ( out filename )\n", me_name.c_str() );
202+
printf( "\tusage : %s [ options ] (string or source file) (out file)\n", me_name.c_str() );
203203
printf( "\n" );
204204
printf( "\t_options_\n" );
205205
printf( "\n" );

endecmd/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
KEY="12345678901234567890123456789012"
3-
SRC="Testing_source_words_for_libendetool_and_endecmd."
3+
SRC="Testing_source_words_for_libendetool_and_endecmd..."
44
ENDECMD=bin/endecmd
55
#TESTRUN=$(shell ${ENDECMD} --help)
66
TESTRUN=$(${ENDECMD} --help)

0 commit comments

Comments
 (0)