README & cmake

This commit is contained in:
Christoph J. Scherr 2022-12-22 01:03:15 +01:00
parent e898582dd3
commit 099e36172a
2 changed files with 37 additions and 39 deletions

View File

@ -5,41 +5,41 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_SOURCE_DIR})
add_executable( abc src/abc.c ) add_executable( abc src/abc.c )
add_executable( adder src/adder.c ) add_executable( adder src/adder.c )
add_executable( args src/args.c ) add_executable( args src/args.c )
add_executable( arrToBin src/arrToBin.c ) add_executable( arrToBin src/arrToBin.c )
add_executable( ascii src/ascii.c ) add_executable( ascii src/ascii.c )
add_executable( calculator src/calculator.c ) add_executable( calculator src/calculator.c )
add_executable( callreference src/callreference.c ) add_executable( callreference src/callreference.c )
add_executable( complex src/complex.c ) add_executable( complex src/complex.c )
add_executable( dividableBy7 src/dividableBy7.c ) add_executable( dividableBy7 src/dividableBy7.c )
add_executable( structdump src/structdump.c ) add_executable( structdump src/structdump.c )
add_executable( echo src/echo.c ) add_executable( echo src/echo.c )
add_executable( echochar src/echochar.c ) add_executable( echochar src/echochar.c )
add_executable( euler src/euler.c ) add_executable( euler src/euler.c )
add_executable( factorial src/factorial.c ) add_executable( factorial src/factorial.c )
add_executable( fail src/fail.c ) add_executable( fail src/fail.c )
add_executable( fread src/fread.c ) add_executable( fread src/fread.c )
add_executable( hello-world src/hello-world.c ) add_executable( hello-world src/hello-world.c )
add_executable( options src/options.c ) add_executable( options src/options.c )
add_executable( pointermagic src/pointermagic.c ) add_executable( pointermagic src/pointermagic.c )
add_executable( primenumbers src/primenumbers.c ) add_executable( primenumbers src/primenumbers.c )
add_executable( quersumme src/quersumme.c ) add_executable( quersumme src/quersumme.c )
add_executable( readfile src/readfile.c ) add_executable( readfile src/readfile.c )
add_executable( redefinition src/redefinition.c ) add_executable( redefinition src/redefinition.c )
add_executable( redefinition-if src/redefinition-if.c ) add_executable( redefinition-if src/redefinition-if.c )
add_executable( return-specified src/return-specified.c ) add_executable( return-specified src/return-specified.c )
add_executable( scanf-test src/scanf-test.c ) add_executable( scanf-test src/scanf-test.c )
add_executable( scnaf-hex-test src/scnaf-hex-test.c ) add_executable( scnaf-hex-test src/scnaf-hex-test.c )
add_executable( signed-to-unsigned src/signed-to-unsigned.c ) add_executable( signed-to-unsigned src/signed-to-unsigned.c )
add_executable( sizeofs src/sizeofs.c ) add_executable( sizeofs src/sizeofs.c )
add_executable( success src/success.c ) add_executable( success src/success.c )
add_executable( sum src/sum.c ) add_executable( sum src/sum.c )
add_executable( tabtest src/tabtest.c ) add_executable( tabtest src/tabtest.c )
add_executable( umlaut src/umlaut.c ) add_executable( umlaut src/umlaut.c )
add_executable( unary-double-not src/unary-double-not.c ) add_executable( unary-double-not src/unary-double-not.c )
add_executable( warning src/warning.c ) add_executable( warning src/warning.c )
add_executable( pointer-arithmetic src/pointer-arithmetic.c ) add_executable( pointer-arithmetic src/pointer-arithmetic.c )
target_link_libraries(abc m) # link libm to abc target_link_libraries(abc m) # link libm to abc

View File

@ -10,9 +10,7 @@ alternative, but that may not always be the case.
All code in this Repository was written on and for a Linux x86_64 system. It might not work on other systems. All code in this Repository was written on and for a Linux x86_64 system. It might not work on other systems.
## Makefile / Compiling ## Makefile / Compiling
I have spent some time building a makefile. You can compile all source code using `make`. I have spent some time building a CMakeLists.txt. You can compile all source code using `cmake . && cmake --build .`.
This will also generate some smaller testfiles for use with the Huffman implementation. In case you want to
try Huffman with some bigger files, you can make your own or do `make big` to autogenerate the bigger files aswell.
### Note: ### Note: