1
0
mirror of https://github.com/raphnet/gc_n64_usb-v3 synced 2024-11-10 19:25:07 -05:00
gc_n64_usb-v3/tool/Makefile

46 lines
957 B
Makefile
Raw Normal View History

CC=gcc
LD=$(CC)
2015-10-24 22:32:08 -04:00
UNAME := $(shell uname -s)
ifeq ($(UNAME), Linux)
HIDAPI_NAME=hidapi-hidraw
else
HIDAPI_NAME=hidapi
endif
2015-10-24 22:54:34 -04:00
ifeq ($(shell uname -o), Msys)
COMPAT_OBJS=sleep.o memmem.o
endif
2015-10-24 22:32:08 -04:00
CFLAGS=-Wall -g `pkg-config $(HIDAPI_NAME) --cflags`
LDFLAGS=`pkg-config $(HIDAPI_NAME) --libs` -g
2015-10-24 22:16:25 -04:00
GTK_CFLAGS=`pkg-config --cflags gtk+-3.0 gmodule-2.0`
GTK_LDFLAGS=`pkg-config --libs gtk+-3.0 gmodule-2.0`
PREFIX=/usr/local
.PHONY : clean install
2015-10-24 22:16:25 -04:00
all: gcn64ctl gcn64ctl_gui
2015-10-24 22:54:34 -04:00
gcn64ctl_gui: gcn64ctl_gui.o gcn64.o gcn64lib.o mempak.o hexdump.o ihex.o $(COMPAT_OBJS)
$(LD) $^ $(LDFLAGS) $(GTK_LDFLAGS) -o $@
2015-10-24 22:16:25 -04:00
2015-10-24 22:54:34 -04:00
gcn64ctl: main.o gcn64.o mempak.o gcn64lib.o hexdump.o gc2n64_adapter.o ihex.o delay.o $(COMPAT_OBJS)
$(LD) $^ $(LDFLAGS) -o $@
2015-10-24 22:16:25 -04:00
gcn64ctl_gui.o: gcn64ctl_gui.c
$(CC) $(CFLAGS) $(GTK_CFLAGS) -c $<
%.o: %.c %.h
$(CC) $(CFLAGS) -c $<
clean:
2015-10-24 22:54:34 -04:00
rm -f *.o gcn64ctl gcn64ctl_gui gcn64ctl.exe gcn64ctl_gui.exe
install:
@echo "Install not done yet. Sorry"