diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2012-11-25 21:15:35 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2012-11-25 21:15:35 +0100 |
commit | 1edbc5e52e48c95a80469a6fb4e0907baa70cbd8 (patch) | |
tree | ab94838cb73276b052a66c470b6f121f9670fa0c | |
parent | 0629204d397174f7abf8a508b070902b8da627bd (diff) | |
download | 0xFFFF-1edbc5e52e48c95a80469a6fb4e0907baa70cbd8.tar.bz2 |
Update Makefiles
-rw-r--r-- | Makefile | 24 | ||||
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | src/Makefile | 13 |
3 files changed, 14 insertions, 25 deletions
@@ -1,22 +1,2 @@ -include config.mk -PREFIX?=/usr/local -DESTDIR?= - -all: - cd src && ${MAKE} all - -static: - cd src && ${MAKE} static - -allusb: - cd src && ${MAKE} allusb - -clean: - cd src && ${MAKE} clean - -install: - mkdir -p ${DESTDIR}${PREFIX}/bin - cp src/0xFFFF ${DESTDIR}${PREFIX}/bin - -deinstall: - rm -f ${DESTDIR}${PREFIX}/bin/0xFFFF +all clean install uninstall: + $(MAKE) -C src $@ @@ -2,5 +2,5 @@ VERSION = 0.6 PREFIX = /usr/local # NetBSD stuff -#CFLAGS += -I/usr/pkg/include -g -O2 +#CPPFLAGS += -I/usr/pkg/include #LDFLAGS += -L/usr/pkg/lib -Wl,-R/usr/pkg/lib diff --git a/src/Makefile b/src/Makefile index 601568a..3d92896 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,9 @@ include ../config.mk -CPPFLAGS += -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE -I. +DESTDIR ?= / +PREFIX ?= /usr/local + +CPPFLAGS += -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE CFLAGS += -W -Wall -O2 -pedantic -std=c99 LIBS += -lm -lusb @@ -15,5 +18,11 @@ $(BIN): $(OBJS) Makefile ../config.mk %.o: %.c Makefile ../config.mk $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< +install: + $(INSTALL) -m 755 $(BIN) $(DESTDIR)$(PREFIX)/bin/ + +uninstall: + $(RM) $(DESTDIR)$(PREFIX)/bin/$(BIN) + clean: - -rm -f $(OBJS) $(BIN) + -$(RM) $(OBJS) $(BIN) |