2009-10-16 00:22:34 +02:00
|
|
|
BIN_STATIC ?= $(BIN).static
|
2009-08-17 19:07:20 +02:00
|
|
|
OBJS ?= main.o
|
|
|
|
|
2009-10-16 00:22:34 +02:00
|
|
|
all: $(BIN) $(BIN_STATIC)
|
2009-08-17 19:07:20 +02:00
|
|
|
.PHONY: all
|
|
|
|
|
2009-10-16 00:22:34 +02:00
|
|
|
$(BIN_STATIC): $(OBJS)
|
|
|
|
$(CC) -static $^ $(LDFLAGS) $(STATIC_LIBS) -o $@
|
|
|
|
|
2009-08-17 19:07:20 +02:00
|
|
|
$(BIN): $(OBJS)
|
2009-10-16 00:22:34 +02:00
|
|
|
$(CC) $^ $(LDFLAGS) -o $@
|
2009-08-17 19:07:20 +02:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean: clean-bins clean-objs
|
|
|
|
|
|
|
|
clean-bins:
|
2009-10-16 00:22:34 +02:00
|
|
|
-rm -f $(BIN) $(BIN_STATIC)
|
2009-08-17 19:07:20 +02:00
|
|
|
|
|
|
|
clean-objs:
|
|
|
|
-rm -f $(OBJS)
|
|
|
|
|
2009-08-21 11:17:58 +02:00
|
|
|
.PHONY: install
|
2009-10-16 00:22:34 +02:00
|
|
|
install: $(BIN) $(BIN_STATIC)
|
2009-08-17 19:07:20 +02:00
|
|
|
install -d $(SBINDIR)
|
|
|
|
install $(INSTALL_STRIPPED) -m 755 $(BIN) $(SBINDIR)
|
2009-10-16 00:22:34 +02:00
|
|
|
install $(INSTALL_STRIPPED) -m 755 $(BIN_STATIC) $(SBINDIR)
|