mirror of
https://github.com/arcan1s/moldyn.git
synced 2025-07-15 06:45:50 +00:00
Release statgen-1.0.1
This commit is contained in:
@ -13,7 +13,15 @@ set (PRIVATE_CLASSES)
|
||||
# headers only files
|
||||
SET (HEADERS_ONLY)
|
||||
# public srcs
|
||||
set (PUBLIC_CLASSES)
|
||||
set (PUBLIC_CLASSES add_main
|
||||
coords
|
||||
graph
|
||||
int2char
|
||||
messages
|
||||
stat_print
|
||||
stat_select
|
||||
stat_sort
|
||||
summary_stat)
|
||||
# public headers
|
||||
set (PUBLIC_HEADERS)
|
||||
# shared libraries
|
||||
@ -23,17 +31,6 @@ else ()
|
||||
set (ADDITIONAL_LIB)
|
||||
endif()
|
||||
set (SOURCES)
|
||||
# for library
|
||||
set (LIBRARY_NAME stat)
|
||||
set (LIB_SOURCES add_main
|
||||
coords
|
||||
graph
|
||||
int2char
|
||||
messages
|
||||
stat_print
|
||||
stat_select
|
||||
stat_sort
|
||||
summary_stat)
|
||||
|
||||
# append list
|
||||
foreach (class ${PRIVATE_CLASSES})
|
||||
@ -51,16 +48,16 @@ foreach (class ${PUBLIC_CLASSES})
|
||||
LIST (APPEND PUBLIC_HEADERS ../include/${PROJECT}/${class}.h)
|
||||
endforeach ()
|
||||
|
||||
# message
|
||||
message (STATUS "SOURCES: ${SOURCES}")
|
||||
|
||||
# link libraries and compile
|
||||
add_library (${LIBRARY_NAME} SHARED ${LIB_SOURCES})
|
||||
add_executable (${PROJECT} ${MAIN_SOURCES} ${SOURCES})
|
||||
target_link_libraries (${PROJECT} ${ADDITIONAL_LIB} ${LIBRARY_NAME})
|
||||
target_link_libraries (${PROJECT} ${ADDITIONAL_LIB})
|
||||
|
||||
# install properties
|
||||
INSTALL (TARGETS ${PROJECT}
|
||||
DESTINATION bin)
|
||||
INSTALL (TARGETS ${LIBRARY_NAME}
|
||||
DESTINATION lib${LIB_SUFFIX})
|
||||
if (ADD_INCLUDE)
|
||||
INSTALL (FILES ${PUBLIC_HEADERS}
|
||||
DESTINATION include/${PROJECT})
|
||||
|
21
statgen/src/Makefile
Normal file
21
statgen/src/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
PROJECT=STATGEN
|
||||
|
||||
CC=gcc
|
||||
CFLAGS=-c -Wall -fPIC
|
||||
LDFLAGS=-lm
|
||||
SOURCES_DIR=src
|
||||
SOURCES=main.c add_main.c coords.c graph.c int2char.c messages.c stat_print.c stat_select.c stat_sort.c summary_stat.c
|
||||
OBJECTS=$(SOURCES:.c=.o)
|
||||
EXECUTABLE=statgen
|
||||
|
||||
$(PROJECT): $(SOURCES) $(EXECUTABLE)
|
||||
|
||||
$(EXECUTABLE): $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
|
Reference in New Issue
Block a user