Use out of source build
This commit is contained in:
		
							
								
								
									
										9
									
								
								compile
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								compile
									
									
									
									
									
								
							| @@ -30,6 +30,11 @@ SRC="\ | |||||||
| TEST_SRC="\ | TEST_SRC="\ | ||||||
|   $(find tests -type f -name "*.c" | xargs -I{} echo -n "{} ") \ |   $(find tests -type f -name "*.c" | xargs -I{} echo -n "{} ") \ | ||||||
| " | " | ||||||
|  | BUILD_DIR="libwapp-build/posix-$BUILD_TYPE" | ||||||
|  | if [[ -d $BUILD_DIR ]]; then | ||||||
|  | 	rm -rf $BUILD_DIR | ||||||
|  | fi | ||||||
|  | mkdir -p $BUILD_DIR | ||||||
|  |  | ||||||
| if [[ $BUILD_TYPE == "release" ]]; then | if [[ $BUILD_TYPE == "release" ]]; then | ||||||
|   CFLAGS+="-O3" |   CFLAGS+="-O3" | ||||||
| @@ -37,8 +42,8 @@ else | |||||||
|   CFLAGS+="-g -fsanitize=address -fsanitize=undefined" |   CFLAGS+="-g -fsanitize=address -fsanitize=undefined" | ||||||
| fi | fi | ||||||
|  |  | ||||||
| OUT="libwapp.so" | OUT="$BUILD_DIR/libwapp.so" | ||||||
| TEST_OUT="./wapptest" | TEST_OUT="$BUILD_DIR/wapptest" | ||||||
|  |  | ||||||
| # Compile tests | # Compile tests | ||||||
| if [[ $(echo $TEST_SRC | xargs) != "" ]]; then | if [[ $(echo $TEST_SRC | xargs) != "" ]]; then | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user