diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 5a13a8e..e392de8 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -23,33 +23,24 @@ jobs: - uses: actions/checkout@v4 # - name: configure # run: ./configure - - name: ln Linux - if: ${{ startsWith(matrix.target, 'ubuntu') }} - run: ln -s Makefile.Linux Makefile - name: Linux libraries if: ${{ startsWith(matrix.target, 'ubuntu') }} run: sudo apt install libssl-dev libpam-dev libpcre3 libpcre3-dev - name: Mac libraries if: ${{ startsWith(matrix.target, 'macos') }} run: brew install pcre - - name: ln Mac - if: ${{ startsWith(matrix.target, 'macos') }} - run: ln -s Makefile.FreeBSD Makefile - - name: ln Windows - if: ${{ startsWith(matrix.target, 'windows') }} - run: copy Makefile.win Makefile - name: make Windows if: ${{ startsWith(matrix.target, 'windows') }} - run: make + run: make -f Makefile.win env: LIBS: '-L "c:/program files/openssl/lib/VC/x64/MT"' CFLAGS: '-I "c:/program files/openssl/include"' - name: make Ubuntu if: ${{ startsWith(matrix.target, 'ubuntu') }} - run: make + run: make -f Makefile.Linux - name: make MacOS if: ${{ startsWith(matrix.target, 'macos') }} - run: make + run: make -f Makefile.FreeBSD env: LDFLAGS: "-L/usr/local/lib -L/opt/homebrew/lib -L/opt/homebrew/opt/openssl/lib" CFLAGS: "-I/usr/local/include -I/opt/homebrew/include -I/usr/local/opt/openssl/include -I/opt/homebrew/opt/openssl/include" @@ -59,5 +50,12 @@ jobs: - name: make install if: ${{ startsWith(matrix.target, 'ubuntu') }} run: make DESTDIR=~/3proxy install - - name: make clean - run: make clean + - name: make clean Windows + if: ${{ startsWith(matrix.target, 'windows') }} + run: make -f Makefile.win clean + - name: make clean Linux + if: ${{ startsWith(matrix.target, 'ubuntu') }} + run: make -f Makefile.Linux clean + - name: make clean MacOS + if: ${{ startsWith(matrix.target, 'macos') }} + run: make -f Makefile.FreeBSD clean diff --git a/Makefile.win b/Makefile.win index 042b06e..ea97c65 100644 --- a/Makefile.win +++ b/Makefile.win @@ -10,13 +10,13 @@ BUILDDIR = ../bin/ CC ?= gcc -CFLAGS += -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL +CFLAGS := -O2 -s -c -mthreads -DWITH_STD_MALLOC -DWITH_WSAPOLL $(CFLAGS) COUT = -o LN ?= $(CC) LDFLAGS ?= -O2 -s -mthreads DLFLAGS ?= -shared DLSUFFICS = .dll -LIBS ?= -lws2_32 -lodbc32 -ladvapi32 -luser32 +LIBS := -lws2_32 -lodbc32 -ladvapi32 -luser32 $(LIBS) LIBSPREFIX = -l LIBSSUFFIX = LNOUT = -o