RetroArch/libretro-common/net/test/Makefile

43 lines
868 B
Makefile
Raw Normal View History

2016-03-02 23:17:04 +00:00
TARGETS = http_test net_ifinfo
2016-03-21 17:37:19 +00:00
LIBRETRO_COMM_DIR := ../..
2015-10-15 14:04:26 +00:00
2016-03-21 17:37:19 +00:00
INCFLAGS = -I$(LIBRETRO_COMM_DIR)/include
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
ifeq ($(DEBUG),1)
CFLAGS += -O0 -g
else
CFLAGS += -O2
endif
CFLAGS += -Wall -pedantic -std=gnu99
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
HTTP_TEST_C = \
2016-03-21 17:37:19 +00:00
$(LIBRETRO_COMM_DIR)/net/net_http.c \
2016-03-02 23:17:04 +00:00
net_http_test.c \
2016-03-21 17:37:19 +00:00
$(LIBRETRO_COMM_DIR)/net/net_compat.c \
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
HTTP_TEST_OBJS := $(HTTP_TEST_C:.c=.o)
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
NET_IFINFO_C = \
2016-03-21 17:37:19 +00:00
$(LIBRETRO_COMM_DIR)/net/net_ifinfo.c \
2016-03-02 23:17:04 +00:00
net_ifinfo_test.c
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
NET_IFINFO_OBJS := $(NET_IFINFO_C:.c=.o)
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
.PHONY: all clean
2015-10-15 14:04:26 +00:00
2016-03-02 23:17:04 +00:00
all: $(TARGETS)
%.o: %.c
$(CC) $(INCFLAGS) $< -c $(CFLAGS) -o $@
http_test: $(HTTP_TEST_OBJS)
$(CC) $(INCFLAGS) $(HTTP_TEST_OBJS) $(CFLAGS) -o $@
net_ifinfo: $(NET_IFINFO_OBJS)
$(CC) $(INCFLAGS) $(NET_IFINFO_OBJS) $(CFLAGS) -o $@
clean:
rm -rf $(TARGETS) $(HTTP_TEST_OBJS) $(NET_IFINFO_OBJS)