diff --git a/Makefile.windows b/Makefile.example similarity index 73% rename from Makefile.windows rename to Makefile.example index 7caa838..a348e20 100644 --- a/Makefile.windows +++ b/Makefile.example @@ -6,11 +6,12 @@ source := $(wildcard ${path}) headers:= $(wildcard ${include}) obj := $(patsubst src/%, bin/%, $(patsubst %.c,%.o, $(patsubst %.s,%.s.o, $(source)))) -CPLEX_INCLUDE = /cygdrive/c/Program\ Files/IBM/ILOG/CPLEX_Studio1261/cplex/include/ilcplex -CPLEX_LIB = /cygdrive/c/Program\ Files/IBM/ILOG/CPLEX_Studio1261/cplex/bin/x64_win64 +CPLEX_INCLUDE = /.../.../.../IBM/ILOG/CPLEX_Studio1261/cplex/include/ilcplex +CPLEX_LIB_PATH = /.../.../.../IBM/ILOG/CPLEX_Studio1261/cplex/bin/x64_win64 +CPLEX_LIB = cplex1261 flags := -O3 -g -Wall -pedantic -g --std=c11 -Winline -I$(CPLEX_INCLUDE) -libs := -L$(CPLEX_LIB) -lcplex1261 -lm -lpthread +libs := -L$(CPLEX_LIB_PATH) -l$(CPLEX_LIB) -lm -lpthread compile: $(obj) $(binary) diff --git a/Makefile.linux b/Makefile.linux deleted file mode 100644 index b1385c7..0000000 --- a/Makefile.linux +++ /dev/null @@ -1,34 +0,0 @@ -path := src/*/*.c src/*.c src/*.s -include:= src/*.h -binary := bin/hw2.run - -source := $(wildcard ${path}) -headers:= $(wildcard ${include}) -obj := $(patsubst src/%, bin/%, $(patsubst %.c,%.o, $(patsubst %.s,%.s.o, $(source)))) - -CPLEX_INCLUDE = /opt/cplex-12.4/distribution/cplex/include/ilcplex - -flags := -O3 -g -Wall -pedantic -g --std=c11 -Winline -I$(CPLEX_INCLUDE) -libs := -lcplex -lm -lpthread - -compile: $(obj) $(binary) - -run: compile - @$(binary) - -bin/%.s.o: src/%.s - @echo ' as $<' - @$(AS) $< -o $@ - -bin/%.o: src/%.c $(headers) - @mkdir -p bin - @echo ' cc $<' - @$(CC) -c $(flags) $< -o $@ - -$(binary): $(obj) - @mkdir -p bin - @echo ' ld $@' - @$(CC) $(flags) $(obj) $(libs) -o $@ - -clean: - @$(RM) -f $(obj) $(binary)