quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

Makefile.m32 (2160B)


      1 #############################################################
      2 # Copyright (C) The c-ares project and its contributors
      3 # SPDX-License-Identifier: MIT
      4 #
      5 # Makefile for building arestest.exe with MingW32 (GCC-3.2)
      6 # Use: make -f Makefile.m32 GTEST_ROOT=....
      7 #
      8 ########################################################
      9 CXX = g++
     10 CC = gcc
     11 LD = g++
     12 
     13 WIN32_WINNT ?= 0x0602
     14 
     15 ifeq "$(GTEST_ROOT)" ""
     16   $(error missing GTEST_ROOT)
     17 endif
     18 
     19 # Where to find the c-ares source code; needed because the tests use library-internal headers
     20 ARES_SRC_DIR = ..
     21 # Where to find the built c-ares static library
     22 ARES_BLD_DIR = ..
     23 ARESLIB = $(ARES_BLD_DIR)/src/lib/libcares.a
     24 CPPFLAGS = -I$(ARES_SRC_DIR)/include -I$(ARES_SRC_DIR)/src/lib -I$(ARES_SRC_DIR)/src/lib/include -I$(GTEST_ROOT)/include -DCARES_STATICLIB -DCARES_NO_DEPRECATED -D_WIN32_WINNT=$(WIN32_WINNT)
     25 CXXFLAGS = -Wall $(PTHREAD_CFLAGS) -std=gnu++14
     26 LDFLAGS =
     27 LDLIBS = -lws2_32 -liphlpapi
     28 
     29 # Makefile.inc provides the TESTSOURCES and TESTHEADERS defines
     30 include Makefile.inc
     31 
     32 OBJS := $(patsubst %.cc,%.o,$(strip $(TESTSOURCES)))
     33 FUZZOBJS := $(patsubst %.c,%.o,$(strip $(FUZZSOURCES)))
     34 FUZZNAMEOBJS := $(patsubst %.c,%.o,$(strip $(FUZZNAMESOURCES)))
     35 DNSDUMPOBJS := $(patsubst %.cc,%.o,$(strip $(DUMPSOURCES)))
     36 
     37 all: arestest.exe aresfuzz.exe aresfuzzname.exe dnsdump.exe
     38 
     39 arestest.exe: $(OBJS)
     40 	$(LD) $(LDFLAGS) -o $@ $^  -L$(ARES_BLD_DIR)/src/lib -lcares $(LDLIBS) -L$(GTEST_ROOT)/lib -lgmock -lgtest
     41 
     42 aresfuzz.exe: $(FUZZOBJS)
     43 	$(LD) $(LDFLAGS) -o $@ $^  -L$(ARES_BLD_DIR)/src/lib -lcares $(LDLIBS)
     44 
     45 aresfuzzname.exe: $(FUZZNAMEOBJS)
     46 	$(LD) $(LDFLAGS) -o $@ $^  -L$(ARES_BLD_DIR)/src/lib -lcares $(LDLIBS)
     47 
     48 dnsdump.exe: $(DNSDUMPOBJS)
     49 	$(LD) $(LDFLAGS) -o $@ $^  -L$(ARES_BLD_DIR)/src/lib -lcares $(LDLIBS)
     50 
     51 $(OBJS): $(TESTHEADERS)
     52 
     53 .cc.o:
     54 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
     55 .c.o:
     56 	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
     57 
     58 test: arestest.exe
     59 	./arestest.exe --gtest_filter=-*LiveSearchTXT*:*LiveSearchANY*:*LiveGetLocalhostByAddr*
     60 vtest: arestest.exe
     61 	./arestest.exe -v --gtest_filter=-*LiveSearchTXT*:*LiveSearchANY*:*LiveGetLocalhostByAddr*
     62 
     63 clean:
     64 	$(RM) $(OBJS) arestest.exe aresfuzz.exe aresfuzzname.exe dnsdump.exe
     65 
     66