mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Add "vsyasm", a batch version of yasm primarily useful for VS2010.
Basically the objfile, listfile, and mapfile options specify output directories instead of files. Multiple files are accepted and each one is independently assembled in command line order. All options (such as include directories and predefined macros) apply to all input files. Any error terminates the process early. Suggested by: Brian Gladman svn path=/trunk/yasm/; revision=2284
This commit is contained in:
parent
419e16fc71
commit
463f4d7963
6 changed files with 1391 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ CFLAGS=-DHAVE_CONFIG_H -IMkfiles/dj -O -I.
|
|||
CC?=gcc
|
||||
BUILDCC?=$(CC)
|
||||
|
||||
all: yasm ytasm
|
||||
all: yasm ytasm vsyasm
|
||||
|
||||
LIBYASM_OBJS= \
|
||||
libyasm/assocdat.o \
|
||||
|
|
@ -162,6 +162,12 @@ YTASM_OBJS= \
|
|||
$(LIBYASM_OBJS) \
|
||||
$(MODULES_OBJS)
|
||||
|
||||
VSYASM_OBJS= \
|
||||
frontends/vsyasm/vsyasm.o \
|
||||
frontends/yasm/yasm-options.o \
|
||||
$(LIBYASM_OBJS) \
|
||||
$(MODULES_OBJS)
|
||||
|
||||
genstring: genstring.c
|
||||
$(BUILDCC) -o $@ $<
|
||||
|
||||
|
|
@ -259,6 +265,9 @@ yasm: $(YASM_OBJS)
|
|||
ytasm: $(YTASM_OBJS)
|
||||
$(CC) -o ytasm $(YTASM_OBJS)
|
||||
|
||||
vsyasm: $(VSYASM_OBJS)
|
||||
$(CC) -o vsyasm $(VSYASM_OBJS)
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ CFLAGS=-DHAVE_CONFIG_H -IMkfiles -I.
|
|||
CC?=gcc
|
||||
BUILDCC?=$(CC)
|
||||
|
||||
all: yasm ytasm
|
||||
all: yasm ytasm vsyasm
|
||||
|
||||
LIBYASM_OBJS= \
|
||||
libyasm/assocdat.o \
|
||||
|
|
@ -165,6 +165,12 @@ YTASM_OBJS= \
|
|||
$(LIBYASM_OBJS) \
|
||||
$(MODULES_OBJS)
|
||||
|
||||
VSYASM_OBJS= \
|
||||
frontends/vsyasm/vsyasm.o \
|
||||
frontends/yasm/yasm-options.o \
|
||||
$(LIBYASM_OBJS) \
|
||||
$(MODULES_OBJS)
|
||||
|
||||
genstring: genstring.c
|
||||
$(BUILDCC) -o $@ $<
|
||||
|
||||
|
|
@ -262,6 +268,9 @@ yasm: $(YASM_OBJS)
|
|||
ytasm: $(YTASM_OBJS)
|
||||
$(CC) -o ytasm $(YTASM_OBJS)
|
||||
|
||||
vsyasm: $(VSYASM_OBJS)
|
||||
$(CC) -o vsyasm $(VSYASM_OBJS)
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
EXTRA_DIST += frontends/yasm/Makefile.inc
|
||||
EXTRA_DIST += frontends/tasm/Makefile.inc
|
||||
EXTRA_DIST += frontends/vsyasm/Makefile.inc
|
||||
|
||||
include frontends/yasm/Makefile.inc
|
||||
include frontends/tasm/Makefile.inc
|
||||
include frontends/vsyasm/Makefile.inc
|
||||
|
|
|
|||
29
frontends/vsyasm/CMakeLists.txt
Normal file
29
frontends/vsyasm/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${yasm_SOURCE_DIR}/frontends/yasm
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/license.c
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/frontends/yasm/genstring.py
|
||||
license_msg
|
||||
${CMAKE_CURRENT_BINARY_DIR}/license.c
|
||||
${CMAKE_SOURCE_DIR}/COPYING
|
||||
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/COPYING
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/frontends/yasm/genstring.py
|
||||
)
|
||||
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
|
||||
|
||||
ADD_EXECUTABLE(vsyasm
|
||||
vsyasm.c
|
||||
${yasm_SOURCE_DIR}/frontends/yasm/yasm-options.c
|
||||
${yasm_SOURCE_DIR}/frontends/yasm/yasm-plugin.c
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(vsyasm libyasm ${LIBDL})
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(vsyasm.c PROPERTIES
|
||||
OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/license.c
|
||||
)
|
||||
|
||||
INSTALL(TARGETS vsyasm RUNTIME DESTINATION bin)
|
||||
11
frontends/vsyasm/Makefile.inc
Normal file
11
frontends/vsyasm/Makefile.inc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# $Id: Makefile.inc 1463 2006-04-05 05:39:23Z peter $
|
||||
|
||||
bin_PROGRAMS += vsyasm
|
||||
|
||||
vsyasm_SOURCES = frontends/vsyasm/vsyasm.c
|
||||
vsyasm_SOURCES += frontends/yasm/yasm-options.c
|
||||
vsyasm_SOURCES += frontends/yasm/yasm-options.h
|
||||
|
||||
$(srcdir)/frontends/vsyasm/vsyasm.c: license.c
|
||||
|
||||
vsyasm_LDADD = libyasm.a $(INTLLIBS)
|
||||
1329
frontends/vsyasm/vsyasm.c
Normal file
1329
frontends/vsyasm/vsyasm.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue