Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gdut-drcom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
gdut-drcom
Commits
f1f9fbbe
Commit
f1f9fbbe
authored
Dec 11, 2016
by
chenhaowen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Makefile detect OS error.
parent
5f4fb1f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
18 deletions
+26
-18
src/Makefile
src/Makefile
+24
-18
src/auth.c
src/auth.c
+1
-0
src/gdut-drcom.c
src/gdut-drcom.c
+1
-0
No files found.
src/Makefile
View file @
f1f9fbbe
#CC:=gcc
VERSION
:=
1.6.6
VERSION
:=
1.6.7
CFLAGS
+=
-Wall
-fPIC
-DDEBUG
-DVERSION
=
\"
$(VERSION)
\"
objects
=
config.o auth.o
all
:
gdut-drcom
@
echo
gdut-drcom
# detect OS
ifeq
($(OS), Windows_NT)
# windows
LIBS
+=
-lws2_32
CFLAGS
+=
-DWIN32
#CFLAGS+=-m32
DLLNAME
=
gdut-drcom.dll.
$(VERSION)
RM
=
del
else
# unix like
DLLNAME
=
gdut-drcom.so.
$(VERSION)
RM
=
rm
-f
endif
# crypto lib
ifeq
($(cryptlib), polarssl)
CFLAGS
+=
-D__WITH_POLARSSL__
LIBS
:
=
-lpolarssl
LIBS
+
=
-lpolarssl
else
ifeq
($(cryptlib), gcrypt)
CFLAGS
+=
-D__WITH_GCRYPT__
LIBS
:
=
-lgcrypt
LIBS
+
=
-lgcrypt
else
ifeq
($(cryptlib), openssl)
CFLAGS
+=
-D__WITH_OPENSSL__
LIBS
:
=
-lcrypto
LIBS
+
=
-lcrypto
else
# default
objects
+=
md5.o md4.o sha1.o
endif
ifeq
($(LANG),)
LIBS
+=
-lws2_32
#CFLAGS+=-m32
DLLNAME
=
gdut-drcom.dll.
$(VERSION)
else
DLLNAME
=
gdut-drcom.so.
$(VERSION)
endif
all
:
gdut-drcom
@
echo
gdut-drcom
gdut-drcom
:
$(objects) gdut-drcom.o
$(CC)
*
.o
-o
gdut-drcom
$(CFLAGS)
$(LIBS)
dll
:
$(objects)
@
echo
gdut-drcom shared library
$(CC)
-shared
$(objects)
-o
$(DLLNAME)
$(CFLAGS)
$(LIBS)
gdut-drcom.o
:
gdut-drcom.c
...
...
@@ -47,8 +57,4 @@ md5.o md4.o sha1.o:
.PHONY
:
clean
clean
:
ifeq
($(LANG),)
del gdut-drcom.exe
*
.o
*
.dll.
$(VERSION)
else
$(RM)
gdut-drcom
*
.o
*
.so.
$(VERSION)
endif
$(RM)
gdut-drcom
$(DLLNAME)
*
.o
src/auth.c
View file @
f1f9fbbe
...
...
@@ -324,6 +324,7 @@ HEART_BEAT_START:
int
exit_auth
(
void
)
{
fprintf
(
drcom_config
.
log_file
,
"gdut-drcom heart-beat exiting!
\r\n
"
);
fclose
(
drcom_config
.
log_file
);
drcom_config
.
exit
=
1
;
return
0
;
}
...
...
src/gdut-drcom.c
View file @
f1f9fbbe
...
...
@@ -119,5 +119,6 @@ static void print_help(char *name)
fprintf
(
stdout
,
" [-c, --config-file <file>] The path to config file.
\n
"
);
fprintf
(
stdout
,
" [-l, --log-file <file>] The path to log file, default as stdout.
\n
"
);
fprintf
(
stdout
,
" [-h, --help] Print this message.
\n
"
);
fprintf
(
stdout
,
" [-v, --version] Print version infomatuon..
\n
"
);
}
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