Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update Makefiles

  • Loading branch information...
commit 1edbc5e52e48c95a80469a6fb4e0907baa70cbd8 1 parent 0629204
@pali pali authored
Showing with 14 additions and 25 deletions.
  1. +2 −22 Makefile
  2. +1 −1  config.mk
  3. +11 −2 src/Makefile
View
24 Makefile
@@ -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 $@
View
2  config.mk
@@ -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
View
13 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)
Please sign in to comment.
Something went wrong with that request. Please try again.