|
Line 0
Link Here
|
|
|
1 |
--- Makefile.orig 2005-09-09 21:52:11.000000000 +0200 |
| 2 |
+++ Makefile 2008-09-17 22:28:53.000000000 +0200 |
| 3 |
@@ -4,13 +4,13 @@ |
| 4 |
|
| 5 |
# change this if you want to use 'make install' and have it go |
| 6 |
# somewhere else: |
| 7 |
-INSTALLDIR = /usr/local/bin |
| 8 |
+PREFIX?= /usr/local |
| 9 |
|
| 10 |
-ARCH = `uname -s | sed -e 's/ /-/g'` |
| 11 |
+OS = `uname -s | sed -e 's/ /-/g'` |
| 12 |
LDFLAGS = `./ldflags` |
| 13 |
|
| 14 |
-OBJS = arch/${ARCH}/getload.o \ |
| 15 |
- arch/${ARCH}/terminfo.o \ |
| 16 |
+OBJS = arch/${OS}/getload.o \ |
| 17 |
+ arch/${OS}/terminfo.o \ |
| 18 |
${NULL} |
| 19 |
|
| 20 |
# this is what I use most places... |
| 21 |
@@ -18,7 +18,7 @@ |
| 22 |
|
| 23 |
# for the things in the sub-directory: |
| 24 |
INCLUDES = -I$${PWD:-.} \ |
| 25 |
- -I$${PWD:-.}/arch/${ARCH} \ |
| 26 |
+ -I$${PWD:-.}/arch/${OS} \ |
| 27 |
-I$${PWD:-.}/arch/default |
| 28 |
|
| 29 |
# Debugging compiles? |
| 30 |
@@ -26,7 +26,7 @@ |
| 31 |
|
| 32 |
VERSION = -DVERSION='"'`cat Version`'"' |
| 33 |
|
| 34 |
-CFLAGS = $(INCLUDES) $(OTHER_FLAGS) $(DEBUG) $(VERSION) |
| 35 |
+CFLAGS+= $(INCLUDES) $(OTHER_FLAGS) $(DEBUG) $(VERSION) |
| 36 |
|
| 37 |
# most people won't want loader, so don't bother building it: |
| 38 |
# PROGRAMS = archbuild loader |
| 39 |
@@ -57,12 +57,12 @@ |
| 40 |
ln -s FreeBSD $@ |
| 41 |
|
| 42 |
$(ARCHLINKS_THISARCH): |
| 43 |
- ln -s ${ARCH} $@ |
| 44 |
+ ln -s ${OS} $@ |
| 45 |
|
| 46 |
archlinks: $(ARCHLINKS) |
| 47 |
|
| 48 |
archbuild: archlinks |
| 49 |
- make archtest ttyload ARCH=$(ARCH) |
| 50 |
+ make archtest ttyload OS=$(OS) |
| 51 |
|
| 52 |
ttyload.c: ttyload.h Version |
| 53 |
touch ttyload.c |
| 54 |
@@ -82,7 +82,10 @@ |
| 55 |
|
| 56 |
# install, gently. not much to it: |
| 57 |
install: $(PROGRAMS) |
| 58 |
- /bin/cp ttyload ${INSTALLDIR}/ttyload |
| 59 |
+ install -m 755 ttyload ${PREFIX}/bin/ |
| 60 |
+ |
| 61 |
+deinstall: |
| 62 |
+ rm -f ${PREFIX}/bin/ttyload |
| 63 |
|
| 64 |
# because different systems' make have different behaviors on how they |
| 65 |
# deal with building stuff in subdirectories, and because I don't feel |