Skip to content

Commit

Permalink
Fixed Makefile to build ./infrakit-instance-oneview
Browse files Browse the repository at this point in the history
Can be built with either build_plugin.sh or the Makefile
  • Loading branch information
thebsdbox committed Mar 6, 2017
1 parent 70a9020 commit e408b9e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 8 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

*.plist

instance-infrakit-oneview/

lib/

instance-infrakit-oneview/instance-infrakit-oneview.xcodeproj/


instance-infrakit-oneview/instance-infrakit-oneview.xcodeproj/project.pbxproj

headers/jansson_config.h

headers/jansson.h

instance-infrakit-oneview/instance-infrakit-oneview.xcodeproj/project.pbxproj
30 changes: 22 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
TARGET = instance-infrakit-oneview
LIBS = -lcurl ljansson
TARGET = infrakit-instance-oneview
LIBS = -ljansson -lcurl
LIBPATH = -L./lib/
CC = gcc
CFLAGS = -g -Wall
CFLAGS = -std=gnu99 -Wall -o3 -s

SRC = src/oneviewHTTP.c \
src/oneviewHTTPD.c \
src/oneviewUtils.c \
src/oneviewQuery.c \
src/oneviewJSONParse.c \
src/oneviewInfraKitPlugin.c \
src/oneviewInfraKitInstance.c \
src/oneviewInfraKitState.c \
src/oneviewInfraKitConsole.c \
infrakit-instance-oneview.c

HEADERS= -I./headers/


.PHONY: default all clean

default: $(TARGET)
all: default

OBJECTS = $(patsubst ./src/%.c, %.o, $(./src/wildcard *.c))
HEADERS = $(wildcard ./headers/*.h)

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

.PRECIOUS: $(TARGET) $(OBJECTS)

$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) -Wall $(LIBS) -o $@
$(CC) $(HEADERS) $(SRC) $(CFLAGS) $(LIBPATH) $(LIBS) -o $@

clean:
-rm -f *.o
-rm -f $(TARGET)
-rm -f *.o
-rm -f $(TARGET)

0 comments on commit e408b9e

Please sign in to comment.