Created
January 12, 2015 04:56
-
-
Save TimothyGu/70e62b1f1803b7652d48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC=gcc | |
CFLAGS=-g -O2 -Wall -ISource $(OPTFLAGS) | |
SOURCES=$(wildcard Source/*.c) | |
OBJECTS=$(patsubst %.c,%.o,$(SOURCES)) | |
GUISOURCES=Source/Main.cpp | |
GUIEXE=bin/AGMSAVLTest | |
TARGET=build/libavlduptree.so | |
all: $(TARGET) $(SO_TARGET) | |
$(TARGET): build $(OBJECTS) | |
$(CC) -shared -o $(TARGET) $(OBJECTS) | |
build: | |
@mkdir -p build | |
@mkdir -p bin | |
clean: | |
@rm -rf build $(OBJECTS) $(TESTS) | |
install: all $(GUIEXE) | |
install $(TARGET) $(PREFIX) | |
$(GUIEXE): CFLAGS += -Wno-multichar | |
$(GUIEXE): CFLAGS+= -lbe | |
$(GUIEXE): $(SOURCES) $(GUISOURCES) | |
$(CC) $(CFLAGS) $^ -o $@ | |
install $(GUIEXE) $(BINDIR)/ | |
.PHONY: all clean install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AM_CFLAGS = -Wno-multichar | |
lib_LTLIBRARIES = libavlduptree.la | |
libavlduptree_la_SOURCES = Source/AVLDupTree.c | |
bin_PROGRAMS = AGMSAVLTest | |
AGMSAVLTest_LIBADD = libavlduptree.la | |
AGMSAVLTest_LIBS = -lbe | |
AGMSAVLTest_SOURCES = Source/Main.cpp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment