2011-04-04 17:11:18 +00:00
|
|
|
CC=gcc
|
2011-04-04 17:20:04 +00:00
|
|
|
CFLAGS=-Wall -O2
|
2011-04-04 17:11:18 +00:00
|
|
|
LDFLAGS=
|
|
|
|
SOURCES=main.c 65816.c
|
|
|
|
OBJECTS=$(SOURCES:.c=.o)
|
2015-01-24 08:46:35 +00:00
|
|
|
CAN_INSTALL = no
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
EXECUTABLE = dispel.exe
|
|
|
|
else
|
|
|
|
EXECUTABLE = dispel
|
|
|
|
UNAME_S = $(shell uname -s)
|
|
|
|
ifeq ($(UNAME_S),Linux)
|
|
|
|
CAN_INSTALL = yes
|
|
|
|
endif
|
|
|
|
endif
|
2011-04-04 17:11:18 +00:00
|
|
|
all: $(SOURCES) $(EXECUTABLE)
|
|
|
|
|
|
|
|
$(EXECUTABLE): $(OBJECTS)
|
|
|
|
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
2015-01-24 08:46:35 +00:00
|
|
|
install:
|
2015-06-23 15:27:24 +00:00
|
|
|
cp -v $(EXECUTABLE) /usr/local/bin
|
2015-01-24 08:46:35 +00:00
|
|
|
#FIXME It ALWAYS copies dispel to /usr/bin, regardless of OS
|
|
|
|
uninstall:
|
2015-06-23 15:27:24 +00:00
|
|
|
rm -rf /usr/local/bin/$(EXECUTABLE)
|
2011-04-04 17:11:18 +00:00
|
|
|
clean:
|
|
|
|
rm *.o ${EXECUTABLE}
|