Fix cow Makefile to install to /usr/local
This makes it safe to build on multiple machines of different architectures.
This commit is contained in:
parent
0b91f80776
commit
aca12e3b5b
|
@ -1,2 +1,4 @@
|
|||
*.o
|
||||
/cow
|
||||
/i686
|
||||
/x86_64
|
||||
/alpha
|
||||
|
|
11
cow/Makefile
11
cow/Makefile
|
@ -1,10 +1,17 @@
|
|||
MAIN = cow
|
||||
ARCH=$(shell uname -m)
|
||||
MAIN = $(ARCH)/cow
|
||||
CFLAGS = -I/usr/include/libxml2 -DDEBUG -pedantic -ansi -Wall
|
||||
LDFLAGS = $(CFLAGS) -lxml2 -lxslt
|
||||
SOURCES = $(wildcard *.c)
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
OBJECTS = $(addprefix $(ARCH)/,$(SOURCES:.c=.o))
|
||||
|
||||
all: $(MAIN)
|
||||
|
||||
$(ARCH):
|
||||
mkdir -p $(ARCH)
|
||||
|
||||
$(MAIN): $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) -o $@ $(OBJECTS)
|
||||
|
||||
$(ARCH)/%.o: %.c $(ARCH)
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
|
Loading…
Reference in New Issue