mirror of
https://gitee.com/RubyMetric/chsrc.git
synced 2025-12-25 20:52:49 +00:00
Update Makefile
This commit is contained in:
parent
8d35bcd24d
commit
e88fae30b7
11
Makefile
11
Makefile
|
|
@ -24,6 +24,7 @@ endif
|
|||
#=======================
|
||||
|
||||
CFLAGS += -Iinclude -Ilib
|
||||
CFLAGS += -Llib -lxy
|
||||
|
||||
ifeq ($(On-Windows), 1)
|
||||
CLANG_FLAGS = -target x86_64-pc-windows-gnu
|
||||
|
|
@ -71,6 +72,14 @@ all:
|
|||
CI: all
|
||||
@mv $(Target-Name) $(CI_ARTIFACT_NAME)
|
||||
|
||||
libxy: lib/libxy.a lib/libxy.so
|
||||
lib/libxy.a:
|
||||
@cd lib; $(CC) -c $(_C_Warning_Flags) xy.c; $(AR) rcs libxy.a xy.o
|
||||
@echo Compile done: libxy.a
|
||||
lib/libxy.so:
|
||||
@cd lib; $(CC) -fPIC -shared -o libxy.so xy.c
|
||||
@echo Compile done: libxy.so
|
||||
|
||||
|
||||
debug: CFLAGS += -g
|
||||
debug: all
|
||||
|
|
@ -78,7 +87,7 @@ debug: all
|
|||
|
||||
test: test-xy test-fw
|
||||
|
||||
test-xy:
|
||||
test-xy: libxy
|
||||
@$(CC) test/xy.c $(CFLAGS) -o xy
|
||||
@./xy
|
||||
|
||||
|
|
|
|||
2
lib/xy.h
2
lib/xy.h
|
|
@ -107,7 +107,7 @@ void p (const char *s);
|
|||
/******************************************************
|
||||
* Memory
|
||||
******************************************************/
|
||||
inline void * xy_malloc0 (size_t size);
|
||||
void * xy_malloc0 (size_t size);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
* Created On : <2023-08-30>
|
||||
* Last Modified : <2024-12-14>
|
||||
*
|
||||
* Test xy.h
|
||||
* Test xy
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
#include "xy.h"
|
||||
|
|
@ -89,8 +89,8 @@ main (int argc, char const *argv[])
|
|||
assert (xy_dir_exist ("~"));
|
||||
if (xy_on_windows)
|
||||
{
|
||||
assert (xy_file_exist (xy_win_powershell_profile));
|
||||
assert (true == xy_file_exist (xy_win_powershellv5_profile));
|
||||
assert (xy_file_exist (xy_win_powershell_profile()));
|
||||
assert (true == xy_file_exist (xy_win_powershellv5_profile()));
|
||||
assert (xy_dir_exist ("C:\\Users"));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue