Skip to content

Commit

Permalink
Manual Makefiles: Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Kranz committed Jul 24, 2014
1 parent d64afcf commit 0bb1d06
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion avr.mk
@@ -1 +1 @@
export GDSL_AVR=1
export GDSL_ARCH=avr
16 changes: 10 additions & 6 deletions libs/Makefile
@@ -1,14 +1,18 @@
LIBS=gdutil gdsl-multiplex gdwrap readhex rreil jgdsl cppgdsl

#ifndef MANAGED
#GDSL_AVR:=1
#GDSL_X86:=1
#endif
#eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
#$(if $(call eq,$GDSL_ARCH,x86), \
#LIBS+=x86 x86-tester x86-generator \
#)

ifdef GDSL_X86
LIBS+=x86 x86-tester x86-generator
ifeq ($(GDSL_ARCH),x86)
LIBS+=x86 x86-tester x86-generator
endif

#$(info $(call eq,x86,99))

$(info $(LIBS))

.PHONY all: $(LIBS)

$(LIBS):
Expand Down
5 changes: 3 additions & 2 deletions libs/gdwrap/Makefile
Expand Up @@ -5,8 +5,9 @@ INCDS=-Iinclude -I$(MLTK)/include


DEFINES=-DRELAXEDFATAL
ifdef GDSL_X86
DEFINES+=-DGDSL_X86
ifdef GDSL_ARCH
UPPER_ARCH = $(shell echo $(GDSL_ARCH) | tr a-z A-Z)
DEFINES+=-DGDSL_$(UPPER_ARCH)
endif
CFLAGS=-c -g3 -std=c11 -pedantic -Wall -Wfatal-errors $(DEFINES) $(INCDS)

Expand Down
3 changes: 0 additions & 3 deletions libs/jgdsl/Makefile
Expand Up @@ -7,9 +7,6 @@ LIBFLAGS=$(LIBDS) $(LIBS)
INCDS=-Iinclude -I$(MLTK)/include

DEFINES=-DRELAXEDFATAL
ifdef GDSL_X86
DEFINES+=-DGDSL_X86
endif

CFLAGS=-std=c11 -g3 -fPIC -shared -pedantic -Wall -Wfatal-errors $(DEFINES) $(INCDS)

Expand Down
7 changes: 4 additions & 3 deletions libs/rreil-sim/Makefile
Expand Up @@ -4,9 +4,10 @@ CC=gcc
INCDS=-Iinclude -I$(MLTK)/include

DEFINES=-DRELAXEDFATAL
#ifdef GDSL_X86
DEFINES+=-DGDSL_X86
#endif
ifdef GDSL_ARCH
UPPER_ARCH = $(shell echo $(GDSL_ARCH) | tr a-z A-Z)
DEFINES+=-DGDSL_$(UPPER_ARCH)
endif

CFLAGS=-c -g3 -std=c11 -pedantic -Wall -Wfatal-errors $(DEFINES) $(INCDS)

Expand Down
5 changes: 3 additions & 2 deletions libs/rreil/Makefile
Expand Up @@ -4,8 +4,9 @@ CC=gcc
INCDS=-Iinclude -I$(MLTK)/include

DEFINES=-DRELAXEDFATAL
ifdef GDSL_X86
DEFINES+=-DGDSL_X86
ifdef GDSL_ARCH
UPPER_ARCH = $(shell echo $(GDSL_ARCH) | tr a-z A-Z)
DEFINES+=-DGDSL_$(UPPER_ARCH)
endif

CFLAGS=-c -g3 -std=c11 -pedantic -Wall -Wfatal-errors $(DEFINES) $(INCDS)
Expand Down
9 changes: 4 additions & 5 deletions tools/Makefile
Expand Up @@ -14,12 +14,11 @@ LIBDS=-L../lib
#$(info $(MANAGED))

DEFINES=-DRELAXEDFATAL
ifdef GDSL_X86
DEFINES+=-DGDSL_X86
ifdef GDSL_ARCH
UPPER_ARCH = $(shell echo $(GDSL_ARCH) | tr a-z A-Z)
DEFINES+=-DGDSL_$(UPPER_ARCH)
endif

ifdef GDSL_X86
endif
LIBS +=-lgdsl -lrt -lreadhex -lgdsl-multiplex -ldl -lgdutil -lelf
LIBS_MULT +=-lrt -lreadhex -lgdsl-multiplex -ldl -lgdutil -lelf

Expand Down Expand Up @@ -94,7 +93,7 @@ liveness-sweep: liveness-sweep.o
liveness-sweep.o: liveness-sweep.c
$(CC) $(CFLAGS) liveness-sweep.c -o $@

ifdef GDSL_X86
ifeq ($(GDSL_ARCH),x86)
### x86-test-runner
x86-test-runner:
$(MAKE) -C $@
Expand Down
2 changes: 1 addition & 1 deletion x86.mk
@@ -1 +1 @@
export GDSL_X86=1
export GDSL_ARCH=x86

0 comments on commit 0bb1d06

Please sign in to comment.