Skip to content

Commit

Permalink
Fix install/uninstall rules
Browse files Browse the repository at this point in the history
Install properlly in /usr/local
  • Loading branch information
jmparis committed Feb 6, 2017
1 parent 7128ea3 commit 3a5fbfe
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 22 deletions.
File renamed without changes.
61 changes: 41 additions & 20 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,46 @@
CXX ?= c++
CXXFLAGS ?= -O3
CXXFLAGS += -w
#
# Makefile
#

OBJS := $(filter-out Applewin.cpp Util_MemoryTextFile.cpp,$(wildcard *.cpp))
OBJS := $(OBJS:.cpp=.o)
# Compiler flags
CXX ?= c++
CXXFLAGS ?= -O3
CXXFLAGS += -w

SDL_CONFIG ?= sdl-config
# SDL Library
SDL_CONFIG ?= sdl-config
#SDL_CONFIG ?= sdl2-config
SDL_CFLAGS = $(shell $(SDL_CONFIG) --cflags)
SDL_LIBS = $(shell $(SDL_CONFIG) --libs)
SDL_CFLAGS = $(shell $(SDL_CONFIG) --cflags)
SDL_LIBS = $(shell $(SDL_CONFIG) --libs)

CXXFLAGS += $(SDL_CFLAGS)
LDLIBS += $(SDL_LIBS)


# CURL Library
CURL_CONFIG ?= curl-config
CURL_CFLAGS = $(shell $(CURL_CONFIG) --cflags)
CURL_LIBS = $(shell $(CURL_CONFIG) --libs)

CURL_CONFIG ?= curl-config
CURL_CFLAGS = $(shell $(CURL_CONFIG) --cflags)
CURL_LIBS = $(shell $(CURL_CONFIG) --libs)
CXXFLAGS += $(CURL_CFLAGS)
LDLIBS += $(CURL_LIBS)

CXXFLAGS += $(SDL_CFLAGS)
CXXFLAGS += $(CURL_CFLAGS)
LDLIBS += $(SDL_LIBS) $(CURL_LIBS) -lz -lzip

# Extra libs
LDLIBS += -lz -lzip


OBJS := $(filter-out Applewin.cpp Util_MemoryTextFile.cpp,$(wildcard *.cpp))
OBJS := $(OBJS:.cpp=.o)

# Define executable and installing directory
EXE = linapple
INSTDIR = /usr/local/$(EXE)
STARTUP = /usr/local/bin/$(EXE)
DATA = ../charset40.bmp ../font.bmp ../icon.bmp ../splash.bmp ../Master.dsk ../linapple.installed.conf
EXE = linapple
INSTDIR = /usr/local/$(EXE)
STARTUP = /usr/local/bin/$(EXE)

RES = resources
DSK = ../images/Master.dsk
CONF = linapple.installed.conf

.PHONY: all clean install uninstall

Expand All @@ -40,7 +58,7 @@ clean:
rm -f $(EXE) *.o

#
# Installation routines
# Installation/uninstallation rules
#

install: all
Expand All @@ -51,7 +69,10 @@ install: all
mkdir -p "$(INSTDIR)/ftp/cache"

@echo " o Installing game and data to '$(INSTDIR)'"
cp $(EXE) $(DATA) "$(INSTDIR)"
cp $(EXE) "$(INSTDIR)"
cp -r $(RES) "$(INSTDIR)"
cp $(CONF) "$(INSTDIR)"
cp $(DSK) "$(INSTDIR)/images"

@echo " o Preparing configuration file 'linapple.conf'"
mv "$(INSTDIR)/linapple.installed.conf" "$(INSTDIR)/linapple.conf"
Expand Down
4 changes: 2 additions & 2 deletions src/linapple.installed.conf
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@

# To get access to the disk in second drive(D2), use something like '] CATALOG,D2' at Applesoft DOS(tm) prompt.

Disk Image 1 =
Disk Image 1 = /usr/local/linapple/images/Master.dsk
Disk Image 2 =

# The next parameter defines if you wish to auto-load these disk images in drives at startup!
# Default value is 0 (Off), suggested: 1 (On)

Slot 6 Autoload = 0
Slot 6 Autoload = 1

##########################################################################
#
Expand Down

0 comments on commit 3a5fbfe

Please sign in to comment.