old-Dispel/Makefile

30 lines
573 B
Makefile
Raw Permalink Normal View History

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)
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 $@
install:
cp -v $(EXECUTABLE) /usr/local/bin
#FIXME It ALWAYS copies dispel to /usr/bin, regardless of OS
uninstall:
rm -rf /usr/local/bin/$(EXECUTABLE)
2011-04-04 17:11:18 +00:00
clean:
rm *.o ${EXECUTABLE}