Subversion Repositories Tewi

Rev

Rev 168 | Rev 244 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
43 nishi 1
/* $Id: option.c 240 2024-10-03 05:54:55Z nishi $ */
2
/* This file is not intended to be in the server. */
3
 
4
#include <stdio.h>
5
#include <string.h>
6
 
7
#include "../config.h"
8
 
9
int main(int argc, char** argv) {
10
	if(argc < 3) {
11
		return 1;
12
	}
13
	if(strcmp(argv[1], "cflags") == 0) {
14
#ifndef NO_SSL
15
		printf("-I %s/openssl/include", argv[2]);
16
#endif
17
	} else if(strcmp(argv[1], "ldflags") == 0) {
18
#ifndef NO_SSL
44 nishi 19
		printf("-L %s/openssl/lib", argv[2]);
43 nishi 20
#endif
21
	} else if(strcmp(argv[1], "objs") == 0) {
22
#ifndef NO_SSL
23
		printf("ssl.o");
24
#endif
25
	} else if(strcmp(argv[1], "libs") == 0) {
26
#ifndef NO_SSL
27
		printf("-lssl -lcrypto");
28
#endif
240 nishi 29
		if(strcmp(argv[3], "WINDOWS") == 0){
30
#ifdef USE_WINSOCK1
31
			printf(" -lwsock32");
32
#else
33
			printf(" -lws2_32");
34
#endif
35
		}else if(strcmp(argv[3], "WINDOWS_WATCOM") == 0){
36
#ifdef USE_WINSOCK1
37
			printf(" wsock32.lib");
38
#else
39
			printf(" ws2_32.lib");
40
#endif
41
		}
43 nishi 42
	}
43
	printf("\n");
168 nishi 44
	return 0;
43 nishi 45
}