1# Copyright (c) 2023 Unionman Technology Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14CC = x86_64-w64-mingw32-gcc 15CFLAGS = -Wall -g -DMG_ENABLE_OPENSSL -D_WIN32 -DMG_ENABLE_WINSOCK -I. 16LDFLAGS = -lwsock32 -L. -lsslMD -lcryptoMD 17 18all: clean webserver 19 $(RUN) ./webserver $(ARGS) 20 21webserver: main.o mongoose.o server_process.o cJSON.o 22 $(CC) $(CFLAGS) main.o mongoose.o server_process.o cJSON.o $(LDFLAGS) -o webserver 23 24main.o: main.c mongoose.h 25 $(CC) $(CFLAGS) -c main.c 26 27mongoose.o: mongoose.c mongoose.h 28 $(CC) $(CFLAGS) -c mongoose.c 29 30cJSON.o: cJSON.c cJSON.h 31 $(CC) $(CFLAGS) -c cJSON.c 32 33clean: 34 del /Q *.o webserver 35