source: Main/trunk/Tool/option.c@ 401

Last change on this file since 401 was 255, checked in by Nishi, on Oct 4, 2024 at 1:08:58 PM

get listdir working [release 2.03E]

  • Property svn:keywords set to Id
File size: 1.5 KB
RevLine 
[43]1/* $Id: option.c 255 2024-10-04 04:08:58Z 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
9int 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
[244]17#ifdef BUILD_GUI
[255]18 if(strcmp(argv[3], "WINDOWS_WATCOM") == 0) {
[244]19 printf(" -b nt_win");
[255]20 } else if(strcmp(argv[3], "WINDOWS") == 0) {
[244]21 printf(" -mwindows");
22 }
23#endif
[43]24 } else if(strcmp(argv[1], "ldflags") == 0) {
25#ifndef NO_SSL
[44]26 printf("-L %s/openssl/lib", argv[2]);
[43]27#endif
[244]28#ifdef BUILD_GUI
[255]29 if(strcmp(argv[3], "WINDOWS_WATCOM") == 0) {
[244]30 printf(" -b nt_win");
[255]31 } else if(strcmp(argv[3], "WINDOWS") == 0) {
[244]32 printf(" -mwindows");
33 }
34#endif
[43]35 } else if(strcmp(argv[1], "objs") == 0) {
36#ifndef NO_SSL
[244]37 printf("ssl.%s", argv[4]);
[43]38#endif
[244]39#ifdef BUILD_GUI
[255]40 if(strcmp(argv[3], "WINDOWS") == 0 || strcmp(argv[3], "WINDOWS_WATCOM") == 0) {
[244]41 printf(" gui.%s", argv[4]);
42 }
43#endif
[43]44 } else if(strcmp(argv[1], "libs") == 0) {
45#ifndef NO_SSL
46 printf("-lssl -lcrypto");
47#endif
[255]48 if(strcmp(argv[3], "WINDOWS") == 0) {
[240]49#ifdef USE_WINSOCK1
50 printf(" -lwsock32");
51#else
52 printf(" -lws2_32");
53#endif
[244]54#ifdef BUILD_GUI
55 printf(" -lcomctl32");
[249]56 printf(" -luser32");
[244]57#endif
[255]58 } else if(strcmp(argv[3], "WINDOWS_WATCOM") == 0) {
[240]59#ifdef USE_WINSOCK1
60 printf(" wsock32.lib");
61#else
62 printf(" ws2_32.lib");
63#endif
[244]64#ifdef BUILD_GUI
65 printf(" comctl32.lib");
[249]66 printf(" user32.lib");
[244]67#endif
[240]68 }
[43]69 }
70 printf("\n");
[168]71 return 0;
[43]72}
Note: See TracBrowser for help on using the repository browser.