Skip to content

Commit

Permalink
Added target to Makefile to build static executable for portable depl…
Browse files Browse the repository at this point in the history
…oyment.
  • Loading branch information
neurotensin committed Dec 10, 2015
1 parent 1120da8 commit cc5e8d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,22 @@ CC = gcc
CFLAGS += -pedantic -Wall -O3
LFLAGS = -lm $(LDFLAGS)

TARGET = prodigal
TARGET = prodigal
STARGET = prodigal.static
SOURCES = $(shell echo *.c)
HEADERS = $(shell echo *.h)
OBJECTS = $(SOURCES:.c=.o)

INSTALLDIR = /usr/local/bin

all: $(TARGET)
all: $(TARGET) $(STARGET)

$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)

$(STARGET): $(OBJECTS)
$(CC) -static $(CFLAGS) -o $@ $^ $(LFLAGS)

%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c -o $@ $<

Expand Down

0 comments on commit cc5e8d0

Please sign in to comment.