old-Dispel/Makefile
Morten Delenk 89c01b98f0 Made linux-dependent-code unix-dependent
!Checks for _LINUX_ being defined are not checks for _WIN32 being not defined
!Makefile does not touch /usr/bin anymore
2015-06-23 15:27:24 +00:00

29 lines
573 B
Makefile

CC=gcc
CFLAGS=-Wall -O2
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
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)
clean:
rm *.o ${EXECUTABLE}