summaryrefslogtreecommitdiffstats
path: root/Makefile_op
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile_op')
-rw-r--r--Makefile_op27
1 files changed, 13 insertions, 14 deletions
diff --git a/Makefile_op b/Makefile_op
index 2593383..6d34e67 100644
--- a/Makefile_op
+++ b/Makefile_op
@@ -16,34 +16,33 @@ OBJECTS = op.o \
I2CSPI.o \
strings.o
-UNAME := $(shell uname)
-ifneq (, $(findstring _NT-, $(UNAME)))
- OPFLAG =
-else
- OPFLAG = -lrt
-endif
+LDFLAG = -lrt
all: op
op : $(OBJECTS)
- $(CC) $(CFLAGS) $(OBJECTS) -o op $(OPFLAG)
- rm $(OBJECTS)
+ @echo "\t LD $@"
+ @$(CC) $(OBJECTS) -o op $(LDFLAG)
+ @rm $(OBJECTS)
%.o : %.c
- $(CC) $(CFLAGS) -c $<
+ @echo "\t CC $@"
+ @$(CC) $(CFLAGS) -c $<
clean:
- rm -f op $(OBJECTS)
+ @echo "\t CLEAN ALL"
+ @rm -f op $(OBJECTS)
prefix := /usr/local
install: op
- test -d $(prefix) || mkdir $(prefix)
- test -d $(prefix)/bin || mkdir $(prefix)/bin
- install -m 0755 op $(prefix)/bin;
+ @echo "\t Installing op"
+ @test -d $(prefix) || mkdir $(prefix)
+ @test -d $(prefix)/bin || mkdir $(prefix)/bin
+ @install -m 0755 op $(prefix)/bin;
package:
- @echo "Creating op_$(VERSION).tar.gz"
+ @echo "\t Creating op_$(VERSION).tar.gz"
@mkdir op-$(VERSION)
@cp *.c *.h gpl-2.0.txt Makefile readme utils/*.c op-$(VERSION)
@tar -czf op_$(VERSION).tar.gz op-$(VERSION)